Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</div>

@if (action.comment) {
<p class="font-italic mt-2">- {{ action.comment }}</p>
<osf-truncated-text class="block font-italic mt-2" [text]="action.comment" />
}
</div>
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, inject, input } from '@an
import { ActivatedRoute, Router } from '@angular/router';

import { collectionFilterNames } from '@osf/features/collections/constants';
import { IconComponent } from '@osf/shared/components';
import { IconComponent, TruncatedTextComponent } from '@osf/shared/components';
import { CollectionSubmissionWithGuid } from '@osf/shared/models';
import { DateAgoPipe } from '@osf/shared/pipes';
import { CollectionsSelectors } from '@osf/shared/stores';
Expand All @@ -18,7 +18,7 @@ import { SubmissionReviewStatus } from '../../enums';

@Component({
selector: 'osf-submission-item',
imports: [TranslatePipe, IconComponent, DateAgoPipe, Button],
imports: [TranslatePipe, IconComponent, DateAgoPipe, Button, TruncatedTextComponent],
templateUrl: './collection-submission-item.component.html',
styleUrl: './collection-submission-item.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<span>{{ action.creator?.name }}</span>

@if (action.comment.length) {
<span class="font-italic">- {{ action.comment }}</span>
<osf-truncated-text class="font-italic" [text]="action.comment" />
}
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button } from 'primeng/button';

import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';

import { IconComponent } from '@osf/shared/components';
import { IconComponent, TruncatedTextComponent } from '@osf/shared/components';
import { DateAgoPipe } from '@osf/shared/pipes';

import { PREPRINT_ACTION_LABEL, ReviewStatusIcon } from '../../constants';
Expand All @@ -13,7 +13,7 @@ import { PreprintSubmission, PreprintWithdrawalSubmission } from '../../models';

@Component({
selector: 'osf-preprint-submission-item',
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe],
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe, TruncatedTextComponent],
templateUrl: './preprint-submission-item.component.html',
styleUrl: './preprint-submission-item.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h4>{{ submission().title }}</h4>
}

@if (action.comment.length) {
<span class="font-italic">- {{ action.comment }}</span>
<osf-truncated-text class="font-italic" [text]="action.comment" />
}
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Button } from 'primeng/button';
import { DatePipe } from '@angular/common';
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';

import { IconComponent } from '@osf/shared/components';
import { IconComponent, TruncatedTextComponent } from '@osf/shared/components';
import { DateAgoPipe } from '@osf/shared/pipes';

import { REGISTRY_ACTION_LABEL, ReviewStatusIcon } from '../../constants';
Expand All @@ -14,7 +14,7 @@ import { RegistryModeration } from '../../models';

@Component({
selector: 'osf-registry-submission-item',
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe, DatePipe],
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe, DatePipe, TruncatedTextComponent],
templateUrl: './registry-submission-item.component.html',
styleUrl: './registry-submission-item.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class MakeDecisionComponent {
const limit = formInputLimits.decisionComment.maxLength;
return this.translateService.instant('preprints.details.decision.commentLengthError', {
limit,
difference: Math.abs(limit - this.reviewerComment()!.length).toString(),
length: this.reviewerComment()!.length,
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2409,7 +2409,7 @@
"post": "Submission will no longer be publicly available."
},
"commentPlaceholder": "Explain the reasoning behind your decision (optional)",
"commentLengthError": "Comment is {{difference}} character(s) too long (maximum is {{limit}}).",
"commentLengthError": "Comment is {{length}} character(s) too long (maximum is {{limit}}).",
"withdrawalJustification": "Reason for withdrawal (optional, will be publicly displayed)",
"denialJustification": "Reason for denial (required, not publicly visible)",
"justificationRequiredError": "Request decision justification can't be blank",
Expand Down
Loading