Skip to content

LG-6561: Scroll alert into view on password confirm error (IdV app)#6450

Merged
aduth merged 2 commits intomainfrom
aduth-password-confirm-error
Jun 3, 2022
Merged

LG-6561: Scroll alert into view on password confirm error (IdV app)#6450
aduth merged 2 commits intomainfrom
aduth-password-confirm-error

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jun 3, 2022

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

**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
@aduth aduth requested a review from a team June 3, 2022 14:30
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

@aduth aduth Jun 3, 2022

Choose a reason for hiding this comment

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

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.

@aduth aduth merged commit 2fb6294 into main Jun 3, 2022
@aduth aduth deleted the aduth-password-confirm-error branch June 3, 2022 17:35
@aduth aduth mentioned this pull request Jun 7, 2022
@aduth aduth changed the title Scroll alert into view on password confirm error (IdV app) LG-6561: Scroll alert into view on password confirm error (IdV app) Jun 9, 2022
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.

2 participants