Skip to content

Commit 48c1506

Browse files
authored
fix(updates): updates for submissions (#656)
1 parent ffb4b16 commit 48c1506

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

src/app/features/moderation/components/collection-submission-item/collection-submission-item.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
</div>
4949

5050
@if (action.comment) {
51-
<p class="font-italic mt-2">- {{ action.comment }}</p>
51+
<osf-truncated-text class="block font-italic mt-2" [text]="action.comment" />
5252
}
5353
</div>
5454
}

src/app/features/moderation/components/collection-submission-item/collection-submission-item.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ChangeDetectionStrategy, Component, computed, inject, input } from '@an
88
import { ActivatedRoute, Router } from '@angular/router';
99

1010
import { collectionFilterNames } from '@osf/features/collections/constants';
11-
import { IconComponent } from '@osf/shared/components';
11+
import { IconComponent, TruncatedTextComponent } from '@osf/shared/components';
1212
import { CollectionSubmissionWithGuid } from '@osf/shared/models';
1313
import { DateAgoPipe } from '@osf/shared/pipes';
1414
import { CollectionsSelectors } from '@osf/shared/stores';
@@ -18,7 +18,7 @@ import { SubmissionReviewStatus } from '../../enums';
1818

1919
@Component({
2020
selector: 'osf-submission-item',
21-
imports: [TranslatePipe, IconComponent, DateAgoPipe, Button],
21+
imports: [TranslatePipe, IconComponent, DateAgoPipe, Button, TruncatedTextComponent],
2222
templateUrl: './collection-submission-item.component.html',
2323
styleUrl: './collection-submission-item.component.scss',
2424
changeDetection: ChangeDetectionStrategy.OnPush,

src/app/features/moderation/components/preprint-submission-item/preprint-submission-item.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<span>{{ action.creator?.name }}</span>
1919

2020
@if (action.comment.length) {
21-
<span class="font-italic">- {{ action.comment }}</span>
21+
<osf-truncated-text class="font-italic" [text]="action.comment" />
2222
}
2323
</div>
2424
}

src/app/features/moderation/components/preprint-submission-item/preprint-submission-item.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Button } from 'primeng/button';
44

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

7-
import { IconComponent } from '@osf/shared/components';
7+
import { IconComponent, TruncatedTextComponent } from '@osf/shared/components';
88
import { DateAgoPipe } from '@osf/shared/pipes';
99

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

1414
@Component({
1515
selector: 'osf-preprint-submission-item',
16-
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe],
16+
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe, TruncatedTextComponent],
1717
templateUrl: './preprint-submission-item.component.html',
1818
styleUrl: './preprint-submission-item.component.scss',
1919
changeDetection: ChangeDetectionStrategy.OnPush,

src/app/features/moderation/components/registry-submission-item/registry-submission-item.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h4>{{ submission().title }}</h4>
3737
}
3838

3939
@if (action.comment.length) {
40-
<span class="font-italic">- {{ action.comment }}</span>
40+
<osf-truncated-text class="font-italic" [text]="action.comment" />
4141
}
4242
</div>
4343
}

src/app/features/moderation/components/registry-submission-item/registry-submission-item.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Button } from 'primeng/button';
55
import { DatePipe } from '@angular/common';
66
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
77

8-
import { IconComponent } from '@osf/shared/components';
8+
import { IconComponent, TruncatedTextComponent } from '@osf/shared/components';
99
import { DateAgoPipe } from '@osf/shared/pipes';
1010

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

1515
@Component({
1616
selector: 'osf-registry-submission-item',
17-
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe, DatePipe],
17+
imports: [IconComponent, DateAgoPipe, Button, TranslatePipe, DatePipe, TruncatedTextComponent],
1818
templateUrl: './registry-submission-item.component.html',
1919
styleUrl: './registry-submission-item.component.scss',
2020
changeDetection: ChangeDetectionStrategy.OnPush,

src/app/features/preprints/components/preprint-details/make-decision/make-decision.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class MakeDecisionComponent {
179179
const limit = formInputLimits.decisionComment.maxLength;
180180
return this.translateService.instant('preprints.details.decision.commentLengthError', {
181181
limit,
182-
difference: Math.abs(limit - this.reviewerComment()!.length).toString(),
182+
length: this.reviewerComment()!.length,
183183
});
184184
});
185185

src/assets/i18n/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2409,7 +2409,7 @@
24092409
"post": "Submission will no longer be publicly available."
24102410
},
24112411
"commentPlaceholder": "Explain the reasoning behind your decision (optional)",
2412-
"commentLengthError": "Comment is {{difference}} character(s) too long (maximum is {{limit}}).",
2412+
"commentLengthError": "Comment is {{length}} character(s) too long (maximum is {{limit}}).",
24132413
"withdrawalJustification": "Reason for withdrawal (optional, will be publicly displayed)",
24142414
"denialJustification": "Reason for denial (required, not publicly visible)",
24152415
"justificationRequiredError": "Request decision justification can't be blank",

0 commit comments

Comments
 (0)