Skip to content

SF-2956 Fix import question dialog offline error message color - #3918

Open
Nateowami wants to merge 1 commit into
masterfrom
fix/SF-2956-question-import-dialog-offline-messages
Open

Nateowami wants to merge 1 commit into
masterfrom
fix/SF-2956-question-import-dialog-offline-messages

Conversation

@Nateowami

@Nateowami Nateowami commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Fixes the color of the offline error messages (previously they were black).

localhost_5000_projects_6a037a701b73edc272a0c520_checking

This change is Reviewable

@Nateowami Nateowami added the will require testing PR should not be merged until testers confirm testing is complete label Jun 1, 2026
@marksvc marksvc self-assigned this Jun 1, 2026
@marksvc

marksvc commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

This is reviewable in Devin Review.

@Nateowami
Nateowami temporarily deployed to screenshot_diff June 1, 2026 21:12 — with GitHub Actions Inactive
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.93%. Comparing base (6d62696) to head (eef9af9).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3918   +/-   ##
=======================================
  Coverage   80.93%   80.93%           
=======================================
  Files         664      664           
  Lines       42149    42149           
  Branches     6938     6944    +6     
=======================================
  Hits        34115    34115           
  Misses       6866     6866           
  Partials     1168     1168           

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

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

Thank you. BTW, I notice that there are a number of other mat-error element usages in this class. If the problem is that mat-error was being used outside of mat-form-field, then there are a few other places where the text will similarly not be styled as intended.

@marksvc reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Nateowami).

@Nateowami
Nateowami marked this pull request as draft June 2, 2026 13:25
@Nateowami
Nateowami force-pushed the fix/SF-2956-question-import-dialog-offline-messages branch from bc1f9be to 353f5cd Compare August 10, 2026 16:43
@Nateowami
Nateowami force-pushed the fix/SF-2956-question-import-dialog-offline-messages branch from 353f5cd to 24edbec Compare September 1, 2026 01:59
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📸 Screenshot diff deployed! (3 changes)

View the visual diff at: https://pr-3918--sf-screenshot-diffs.netlify.app

@Nateowami
Nateowami force-pushed the fix/SF-2956-question-import-dialog-offline-messages branch from 24edbec to d101dae Compare September 1, 2026 02:21
@Nateowami
Nateowami marked this pull request as ready for review September 1, 2026 03:10
@Nateowami

Copy link
Copy Markdown
Collaborator Author

@marksvc I've made a bunch of changes so this is now materially different. Can you re-review?

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

I see that it was two weeks ago that you pushed and marked this PR as ready for review, although I only got a notification when you commented. Sorry for the additional delay in getting back to you.

@marksvc reviewed 14 files and all commit messages, and made 5 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on Nateowami).


.grit/patterns/mat_error_inside_form_field.md line 23 at r2 (raw file):

Bare mat-error is matched (but there is no single auto-fix; choose error-text or offline-text)

Because mat-error is display: block, have you considered modifying the grit rule to transform any <mat-error> not-inside <mat-form-field> to <span class="error-text">? Because the only difference between .offline-text and .error-text is the display: block;.

Not super important.


src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.html line 52 at r2 (raw file):

                  <a mat-button [href]="urls.transceleratorImportHelpPage" target="_blank">{{ t("learn_more") }}</a>
                  @if (transceleratorRequest.status === "offline") {
                    <span class="offline-text"> {{ t("no_import_offline", { method: "Transcelerator" }) }} </span>

If this was previously a mat-error, which looks to use display: block, it seems that using span class="offline-text" will move to, or potentially move to, an inline display. The screenshot comparison didn't show any trouble. I looked at some of the places in the browser or considered their adjacency to other block elements and they seem fine except for the one I commented on.


src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.scss line 168 at r2 (raw file):

}

:not(mat-form-field) > .mat-mdc-form-field-error {

And are you wanting to bring this over, too? Or should it just be deleted?


src/SIL.XForge.Scripture/ClientApp/src/app/settings/settings.component.html line 90 at r2 (raw file):

              </div>
              @if (biblicalTermsMessage) {
                <span class="error-text">

This one is messed up. With mat-error, it's more like
image.png
with the text to the right of the icon. With span error-text, the text is now below the icon, such as:
image copy 1.png

@Nateowami
Nateowami force-pushed the fix/SF-2956-question-import-dialog-offline-messages branch from d101dae to eef9af9 Compare September 16, 2026 13:55
@Nateowami
Nateowami deployed to screenshot_diff September 16, 2026 14:03 — with GitHub Actions Active

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

Thanks for your review Mark. Unfortunately I had forgotten to push my latest changes, so some of the things you'd mentioned would have been addressed (and I think now are) by just pushing the latest I had locally.

@Nateowami made 5 comments.
Reviewable status: 9 of 15 files reviewed, 4 unresolved discussions (waiting on marksvc).


.grit/patterns/mat_error_inside_form_field.md line 23 at r2 (raw file):

Previously, marksvc wrote…

Because mat-error is display: block, have you considered modifying the grit rule to transform any <mat-error> not-inside <mat-form-field> to <span class="error-text">? Because the only difference between .offline-text and .error-text is the display: block;.

Not super important.

The Grit rule is a lint rule only, not a rewrite. It runs on CI. I don't see a purpose to have it rewrite, which requires some judgement calls depending on the context.

Grit can act as a migrator, but is not being used in that capacity here.


src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.html line 52 at r2 (raw file):

Previously, marksvc wrote…

If this was previously a mat-error, which looks to use display: block, it seems that using span class="offline-text" will move to, or potentially move to, an inline display. The screenshot comparison didn't show any trouble. I looked at some of the places in the browser or considered their adjacency to other block elements and they seem fine except for the one I commented on.

That's a good point, but in a lot of contexts it won't make a difference, such as here, where it's a child of a flex container. On the settings page it made an actual difference.


src/SIL.XForge.Scripture/ClientApp/src/app/checking/import-questions-dialog/import-questions-dialog.component.scss line 168 at r2 (raw file):

Previously, marksvc wrote…

And are you wanting to bring this over, too? Or should it just be deleted?

Good catch; deleted. And the rule never worked as intended because mat-form-field is not the direct parent of .mat-mdc-form-field-error. This rule is supposed to say "style the form field errors that aren't directly in form fields", but actually ends up styling all the errors, including those in form fields. The consequence is that the font size of errors in form fields in this component will revert to the size Material would normally style them, rather than keeping this accidental override.


src/SIL.XForge.Scripture/ClientApp/src/app/settings/settings.component.html line 90 at r2 (raw file):

Previously, marksvc wrote…

This one is messed up. With mat-error, it's more like
image.png
with the text to the right of the icon. With span error-text, the text is now below the icon, such as:
image copy 1.png

Thanks for catching this. Fixed by updating the SCSS file to target .error-text instead of .mat-mdc-form-field-error

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

@marksvc reviewed 6 files and all commit messages, and resolved 4 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on Nateowami).

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

Labels

ready to test will require testing PR should not be merged until testers confirm testing is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants