SF-3831 Inform users that remarks are now on every chapter#3955
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3955 +/- ##
=======================================
Coverage 80.87% 80.88%
=======================================
Files 634 634
Lines 41029 41036 +7
Branches 6659 6680 +21
=======================================
+ Hits 33184 33193 +9
+ Misses 6808 6794 -14
- Partials 1037 1049 +12 ☔ View full report in Codecov by Harness. |
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on pmachapman).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.ts line 349 at r1 (raw file):
const match = version?.match(/^(\d+)\.(\d+)/); if (!match) return 0; return Number(`${match[1]}.${match[2]}`);
Using decimals for version comparison doesn't work. Builds created on version 1.2 are older than builds created on version 1.18, but 1.18 < 1.2.
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami made 2 comments.
Reviewable status: 0 of 6 files reviewed, 3 unresolved discussions (waiting on pmachapman).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.html line 37 at r1 (raw file):
} @else { @if (draftIsAvailable) { @if (isLatestBuild && getMajorMinorVersion(entry.deploymentVersion) >= 1.18) {
I think you meant to add timeframeForPerChapterRemarksNotice as a condition here as well?
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.html line 37 at r1 (raw file):
} @else { @if (draftIsAvailable) { @if (isLatestBuild && getMajorMinorVersion(entry.deploymentVersion) >= 1.18) {
I remember discussing whether to only show on the latest build, and I thought we'd concluded to show regardless of whether the build is the latest one, but I'm not sure.
pmachapman
left a comment
There was a problem hiding this comment.
@pmachapman made 3 comments and resolved 1 discussion.
Reviewable status: 0 of 6 files reviewed, 2 unresolved discussions (waiting on Nateowami).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.html line 37 at r1 (raw file):
Previously, Nateowami wrote…
I think you meant to add
timeframeForPerChapterRemarksNoticeas a condition here as well?
Done. Thank you!
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.html line 37 at r1 (raw file):
Previously, Nateowami wrote…
I remember discussing whether to only show on the latest build, and I thought we'd concluded to show regardless of whether the build is the latest one, but I'm not sure.
Done. I think you are correct.
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.ts line 349 at r1 (raw file):
Previously, Nateowami wrote…
Using decimals for version comparison doesn't work. Builds created on version
1.2are older than builds created on version1.18, but 1.18 < 1.2.
Done. I was assuming that there would not be a v2 Serval coming this year, but I forgot about the past! Thank you!
Nateowami
left a comment
There was a problem hiding this comment.
@Nateowami reviewed 6 files and all commit messages, made 2 comments, and resolved 2 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on pmachapman).
src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-history-list/draft-history-entry/draft-history-entry.component.spec.ts line 448 at r2 (raw file):
fixture.detectChanges(); expect(fixture.nativeElement.querySelector('.per-chapter-remarks-notice')).toBeNull();
For what it's worth, I generally favor putting selectors in a getter on the test environment because negative assertions can easily be forgotten about if the selector changes (for example, if I changed the class name, ran tests, and updated them in the failing tests, the negative assertions would all start to silently pass). Harder to do here because there's no TestEnvironment.
This PR adds a notice to the latest draft, if it is generated with Serval 1.18 or higher, until the end of 2026:
I also took the opportunity to remove an older notice for formatting options, and simplified test construction in
draft-history-entry.component.spec.ts.This change is