Skip to content
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

UIQM-730 Create/Edit/Derive MARC record - Retain focus when MARC record validation rules error display. Show validation issues toasts. #755

Merged
merged 7 commits into from
Nov 25, 2024

Conversation

BogdanDenis
Copy link
Contributor

@BogdanDenis BogdanDenis commented Nov 11, 2024

Description

Create/Edit/Derive MARC record - Retain focus when MARC record validation rules error display.
Show validation issues toasts.

Screenshots

image

Issues

UIQM-730

…rd validation rules error display. Show validation issues toasts.
Copy link

github-actions bot commented Nov 11, 2024

Jest Unit Test Results

  1 files  ±0   45 suites   - 1   2m 19s ⏱️ -15s
481 tests +2  481 ✅ +2  0 💤 ±0  0 ❌ ±0 
484 runs  +2  484 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit dd7e1ce. ± Comparison against base commit 9c8f180.

This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both.
Given useFocusFirstFieldWithError when a field has an error should focus that field ‑ Given useFocusFirstFieldWithError when a field has an error should focus that field
Given QuickMarcEditor when saving form with validation errors and deleted fields should show a toast notification about validation error ‑ Given QuickMarcEditor when saving form with validation errors and deleted fields should show a toast notification about validation error
Given QuickMarcEditor when saving form with validation warnings and errors should show a toast notification about validation warning and error ‑ Given QuickMarcEditor when saving form with validation warnings and errors should show a toast notification about validation warning and error
Given QuickMarcEditor when saving form with validation warnings should show a toast notification about validation warning ‑ Given QuickMarcEditor when saving form with validation warnings should show a toast notification about validation warning

♻️ This comment has been updated with latest results.

Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

Code changes LGTM but I'd like to tweak the language in the toasts a little bit. Sorry, I was a copy editor in college and the job still haunts me. 👻

Comment on lines 763 to 765
"record.save.error.warn": "<b>Please scroll to view the entire record. Resolve errors as needed and save to revalidate the record.</b>{breakingLine}Warn errors: <b>{warnCount}</b>",
"record.save.error.fail": "<b>Please scroll to view the entire record. Resolve errors as needed and save to revalidate the record.</b>{breakingLine}Fail errors: <b>{failCount}</b>{breakingLine}Record cannot be saved with a fail error.",
"record.save.error.failAndWarn": "<b>Please scroll to view the entire record. Resolve errors as needed and save to revalidate the record.</b>{breakingLine}Warn errors: <b>{warnCount}</b>{breakingLine}Fail errors: <b>{failCount}</b>{breakingLine}Record cannot be saved with a fail error.",
Copy link
Member

Choose a reason for hiding this comment

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

  • s/warn errors/warnings/: warnings are notifications that something is not quite right, but validation will still succeed. A record with warnings can be saved.
  • s/fail errors/errors/: an error means validation failed. A record with errors cannot be saved. Alternative to "errors": "failures", but I think "errors" is more common.

Maybe use language like, "Resolve issues as needed..." since "issues" can cover both "warnings" and "errors"?

@BogdanDenis BogdanDenis merged commit 511e30c into master Nov 25, 2024
15 checks passed
@BogdanDenis BogdanDenis deleted the UIQM-730 branch November 25, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants