Skip to content

Commit b0bf250

Browse files
committed
Add notice expiration date
1 parent ab5f937 commit b0bf250

File tree

6 files changed

+20
-6
lines changed

6 files changed

+20
-6
lines changed

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/_draft-history-entry-theme.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
--draft-history-entry-green-color: #{if($is-dark, lightGreen, darkGreen)};
88
--draft-history-entry-grey-color: #{if($is-dark, hsl(0 0% 60%), hsl(0 0% 45%))};
99
--draft-history-entry-subtitle-color: #{if($is-dark, lightGrey, #666)};
10+
--draft-history-entry-new-label: #{mat.get-theme-color($theme, primary, if($is-dark, 70, 40))};
1011
}
1112

1213
@mixin theme($theme) {

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@
2929
<button mat-flat-button class="format-usfm" [routerLink]="['format']">
3030
<mat-icon>build</mat-icon>
3131
<div class="hide-lt-lg">{{ t("formatting_options") }}</div>
32-
<div class="hide-gt-lg">{{ t("options") }}</div>
32+
<div class="hide-gt-lg">{{ t("formatting") }}</div>
3333
</button>
34-
<span>{{ t("new") }} {{ t("change_line_breaks_and_quotation_marks") }}</span>
34+
<div>
35+
<span class="new-label">{{ t("new") }}</span
36+
>&nbsp;
37+
<span>{{ t("change_line_breaks_and_quotation_marks") }}</span>
38+
</div>
3539
</div>
3640
} @else {
3741
@if (canDownloadBuild) {

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ mat-panel-description {
3232
column-gap: 16px;
3333
align-items: center;
3434

35-
::ng-deep mat-icon {
35+
button {
3636
display: flex;
3737
flex-shrink: 0;
3838
}
39+
40+
.new-label {
41+
color: var(--draft-history-entry-new-label);
42+
}
3943
}
4044

4145
.subtitle,

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const mockedTrainingDataService = mock(TrainingDataService);
3838
const mockedActivatedProjectService = mock(ActivatedProjectService);
3939
const mockedFeatureFlagsService = mock(FeatureFlagService);
4040

41-
fdescribe('DraftHistoryEntryComponent', () => {
41+
describe('DraftHistoryEntryComponent', () => {
4242
let component: DraftHistoryEntryComponent;
4343
let fixture: ComponentFixture<DraftHistoryEntryComponent>;
4444

src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ export class DraftHistoryEntryComponent {
272272

273273
private _requireSelectingFormattingOptions?: boolean;
274274
get requireSelectingFormattingOptions(): boolean {
275-
return this._requireSelectingFormattingOptions ?? false;
275+
return (
276+
!!this._requireSelectingFormattingOptions &&
277+
this.featureFlags.usfmFormat.enabled &&
278+
Date.now() < this.showSelectFormatNoticeExpireDate.getTime()
279+
);
276280
}
277281

278282
private _isLatestBuild: boolean = false;
@@ -293,6 +297,7 @@ export class DraftHistoryEntryComponent {
293297

294298
readonly columnsToDisplay: string[] = ['scriptureRange', 'source', 'target'];
295299

300+
private readonly showSelectFormatNoticeExpireDate = new Date('2025-12-01T12:00:00.000Z');
296301
private dataFileQuery?: RealtimeQuery<TrainingDataDoc>;
297302

298303
constructor(

src/SIL.XForge.Scripture/ClientApp/src/assets/i18n/non_checking_en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,10 @@
285285
"draft_unknown": "Unknown",
286286
"error_details": "Please include these details when contacting support for assistance",
287287
"finished_at": "Finished {{ finishedAtTime }}",
288+
"formatting": "Formatting",
288289
"formatting_options": "Formatting options",
289290
"hide_model_training_configuration": "Hide model training configuration",
290291
"new": "NEW!",
291-
"options": "Options",
292292
"requested_at": "Requested {{ requestedAtTime }}.",
293293
"requested_by": "Requested by {{ requestedByUserName }} at {{ requestedAtTime }}.",
294294
"select_formatting_options": "The draft has been created, and there are new formatting options to select. You will only need to do this once, but you can make changes for every new draft if you wish.",

0 commit comments

Comments
 (0)