Skip to content

Update line break draft format wording #3273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RaymondLuong3
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 commented Jun 17, 2025

This PR updates the wording for the line break options in the draft format component. Additionally, the user now navigates back to the generate draft page after saving the changes which is more intuitive. A progress circle has been introduced to notify the user their changes are currently saving.
I marked this as testing not required since the changes can be tested by a developer.

Line break format options


This change is Reviewable

Copy link

codecov bot commented Jun 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.99%. Comparing base (5a11a48) to head (d4e4cab).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3273   +/-   ##
=======================================
  Coverage   81.99%   81.99%           
=======================================
  Files         605      605           
  Lines       35111    35120    +9     
  Branches     5715     5716    +1     
=======================================
+ Hits        28789    28798    +9     
- Misses       5478     5490   +12     
+ Partials      844      832   -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@Nateowami Nateowami left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @RaymondLuong3)


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.ts line 182 at r1 (raw file):

      await this.projectService.onlineSetUsfmConfig(this.projectId, this.currentFormat);
      this.lastSavedState = this.currentFormat;
      // not awaited so that the user is directed to the draft generation page

I don't understand this comment. How does awaiting prevent a redirect after saving?


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.ts line 185 at r1 (raw file):

      this.servalAdministration.onlineRetrievePreTranslationStatus(this.projectId).then(() => {
        this.router.navigate(['projects', this.projectId, 'draft-generation']);
        this.noticeService.show(translate('draft_usfm_format.changes_have_been_saved'));

Given the redirect only happens if it's successful, I think the notice is unneeded and doesn't match what we do elsewhere.


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.html line 65 at r1 (raw file):

            {{ t("save_changes") }}
          </button>
          <div class="progress" [ngClass]="{ saving: saving }">

What about [class.saving]="saving"?


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.html line 66 at r1 (raw file):

          </button>
          <div class="progress" [ngClass]="{ saving: saving }">
            <mat-spinner diameter="24"></mat-spinner>

I really dislike how this spinner changes the layout, but I don't have anything great to suggest. My best idea is to replace the check mark with a spinner, but making that work is somewhat challenging.


src/SIL.XForge.Scripture/ClientApp/src/app/translate/draft-generation/draft-usfm-format/draft-usfm-format.component.scss line 92 at r1 (raw file):

  justify-content: flex-end;

  .progress {

How about:

.progress:not(.saving) {
  visibility: hidden;
}

Only one rule needed, and the intent is clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants