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

Validation summary for form fields pattern #1730

Closed
5 tasks
yaelberger-commits opened this issue Jan 6, 2025 · 6 comments
Closed
5 tasks

Validation summary for form fields pattern #1730

yaelberger-commits opened this issue Jan 6, 2025 · 6 comments

Comments

@yaelberger-commits
Copy link
Collaborator

yaelberger-commits commented Jan 6, 2025

Description

As a (user), I need to be able to see that I have errors in the form fields I filled out or that I've missed required steps in a task so that I can more quickly correct them without having to scroll down a screen to find the problem.

WHY are we building?
Currently we present some errors in context too far down the screen when creating a template and if a user tries to save a template without choosing a template category they will be stuck and have to scroll down to find out why
WHAT are we building?
Something like this error summary
https://design-system.alpha.canada.ca/en/components/error-summary/
VALUE created by our solution
Users can complete the "save template" task more quickly and can find out what their errors are faster

Documentation and Artifacts

Good docs, figma mockups, ADRs, screenshots etc.

Private Zenhub Video

Acceptance Criteria

Given a user makes a mistake or skips a required step when creating a template, when the error message is shown, then there is an error or validation summary at the top of the screen instead of in context so the user is aware there is a problem without having to scroll down

  • Cypress UI tests if needed
  • [ ]
  • A11y
  • Bilingualism

QA Steps

  • Create a new template
  • Fill out the form fields but don't select a template category
  • Try to save the template
  • See validation/error summary at the top of the screen explaining the problem and how to fix it
@yaelberger-commits
Copy link
Collaborator Author

Hey team! Please add your planning poker estimate with Zenhub @amazingphilippe @YedidaZalik @andrewleith

@amazingphilippe
Copy link
Collaborator

PR to add validation summary on the template forms:
cds-snc/notification-admin#2028

Reviewed and merged. Moving to QA

@amazingphilippe amazingphilippe self-assigned this Jan 6, 2025
@andrewleith
Copy link
Member

Nice!!! This was on my mind whenever I had an error on the template page, glad to see the initiative being taken here ❤️

Here is the PR where we first added the validation summary component, in case it helps!

cds-snc/notification-admin#1823

@yaelberger-commits
Copy link
Collaborator Author

One more bit to fix eventually, but could be good to go now

@andrewleith
Copy link
Member

Small bug when you click an error summary link and it focuses automatically on the field after the next form post.

@andrewleith
Copy link
Member

Card for that bug is here:
#1733

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

No branches or pull requests

3 participants