Skip to content

SF-3831 Inform users that remarks are now on every chapter#3955

Merged
Nateowami merged 1 commit into
masterfrom
fix/SF-3831
Jun 18, 2026
Merged

SF-3831 Inform users that remarks are now on every chapter#3955
Nateowami merged 1 commit into
masterfrom
fix/SF-3831

Conversation

@pmachapman

@pmachapman pmachapman commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a notice to the latest draft, if it is generated with Serval 1.18 or higher, until the end of 2026:

image

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 Reviewable

@pmachapman pmachapman added the will require testing PR should not be merged until testers confirm testing is complete label Jun 16, 2026
@pmachapman pmachapman temporarily deployed to screenshot_diff June 16, 2026 23:25 — with GitHub Actions Inactive
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.88%. Comparing base (802f9c7) to head (5206761).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

@Nateowami Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@Nateowami Nateowami self-assigned this Jun 17, 2026

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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 timeframeForPerChapterRemarksNotice as 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.2 are older than builds created on version 1.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!

@pmachapman pmachapman temporarily deployed to screenshot_diff June 17, 2026 21:21 — with GitHub Actions Inactive

@Nateowami Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@Nateowami reviewed 6 files and all commit messages, made 2 comments, and resolved 2 discussions.
Reviewable status: :shipit: 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.

@Nateowami Nateowami added ready to test testing complete Testing of PR is complete and should no longer hold up merging of the PR and removed will require testing PR should not be merged until testers confirm testing is complete ready to test labels Jun 18, 2026
@Nateowami Nateowami enabled auto-merge (squash) June 18, 2026 19:20
@Nateowami Nateowami merged commit 175b5be into master Jun 18, 2026
42 of 43 checks passed
@Nateowami Nateowami deleted the fix/SF-3831 branch June 18, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing complete Testing of PR is complete and should no longer hold up merging of the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants