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

fix(react): Hide loading spinner on CompleteResetPassword only when checks complete #15386

Merged
merged 1 commit into from
May 31, 2023

Conversation

LZoog
Copy link
Contributor

@LZoog LZoog commented May 26, 2023

Because:

  • Users with a recovery key see a flash of CompleteResetPassword before being redirected to AccountRecoveryConfirmKey

This commit:

  • Adjusts the loading spinner state to only hide when recovery key checks have completed

Fixes FXA-7170


See ticket for before.

Here's with this patch, hitting it twice (since it's fast) and then clicking "Don't have a an account recovery key?":

I also tested with an expired link and without a recovery key.

I tried using account.loading here because we have a withLoadingStatus on the account model and are using account.loading in just a couple of other places but there's something weird about it, it seems to load two inputs like it’s showing the complete reset PW screen without text; didn't dig further since we have plans to refactor some of this anyway.

@LZoog LZoog requested a review from a team as a code owner May 26, 2023 18:15
…hecks complete

Because:
* Users with a recovery key see a flash of CompleteResetPassword before being redirected to AccountRecoveryConfirmKey

This commit:
* Adjusts the loading spinner state to only hide when recovery key checks have completed

Fixes FXA-7170
Copy link
Contributor

@vpomerleau vpomerleau left a comment

Choose a reason for hiding this comment

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

LGTM! This works to prevent a flash of the CompleteResetPassword page before redirection.

Just noting that there is still a side issue of the "Reset password with account recovery key" loading even when a link is expired - this will be covered in FXA-7149.

Also spotted some console warnings about ModelValidationErrors and code that causes React state updates should be wrapped into act when the tests are run. I think those were pre-existing though and could be addressed in FXA-7149 too.

@LZoog LZoog merged commit 10dabf7 into main May 31, 2023
@LZoog LZoog deleted the FXA-7170 branch May 31, 2023 17:35
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