LG-6561: Scroll alert into view on password confirm error (IdV app)#6450
Merged
LG-6561: Scroll alert into view on password confirm error (IdV app)#6450
Conversation
**Why**: So that the user isn't left confused about why the page hasn't changed when submitting the password confirmation step with an incorrect password. This was discovered in a recent bug bash, and regresses the current production behavior, where the server-side form submission would reset the scroll position of the page. changelog: Upcoming Features, Identity Verification, Add password confirmation step
zachmargolis
approved these changes
Jun 3, 2022
Comment on lines
+55
to
+60
| {stepErrors.length > 0 && ( | ||
| <ScrollIntoView> | ||
| {stepErrors.map(({ error }) => ( | ||
| <Alert key={error.message} type="error" className="margin-bottom-4"> | ||
| {error.message} | ||
| </Alert> |
Contributor
There was a problem hiding this comment.
does a second submission that gets the same error also get the scrolling behavior? or it is only the first error? I forget if a submission clears out errors or not
Contributor
Author
There was a problem hiding this comment.
does a second submission that gets the same error also get the scrolling behavior? or it is only the first error? I forget if a submission clears out errors or not
It does, yep. I added an extra assertion to the test case in 813d1bd to check for this though, now that you raise it.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why: So that the user isn't left confused about why the page hasn't changed when submitting the password confirmation step with an incorrect password.
This was discovered in a recent bug bash, and regresses the current production behavior, where the server-side form submission would reset the scroll position of the page.
Screen recording:
Before:
scroll-error-into-view-before.mov
After:
scroll-error-into-view.mov