-
Notifications
You must be signed in to change notification settings - Fork 217
feat(signin): show loading spinner in card #19673
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
Conversation
|
Putting it back to draft bc I need to tweak things a bit |
Because: * we want to show the spinner in card to prevent the flashing of the loading screen between auth pages, especially with CMS customized backgrounds This commit: * creates a loading spinner card component and use it in auth flows Closes #FXA-12344 Co-authored-by: Nick Shirley <[email protected]>
58d5558 to
bf6ec60
Compare
| */ | ||
| title?: string; | ||
| children: React.ReactNode; | ||
| children?: React.ReactNode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but curious why this is optional is optional now? Is there a reason to have an AppLayout without children?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need children if it's in the loading state. React.ReactNode includes undefined anyway, but it doesn't allow me to use self-closing tag unless I mark children with ?
| } | ||
|
|
||
| // !recoveryCodes check should happen after checking !totp | ||
| // TODO: pass in cmsInfo when InlineRecoverySetup supports CMS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to do this still?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is left here for future reference
| <Banner type="error" content={{ localizedHeading: error }} /> | ||
| </AppLayout> | ||
| ) : ( | ||
| <AppLayout loading /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double checking that we don't want / need to make a call to getCmsInfo here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't add cmsInfo if the non-loading state doesn't have it
dschom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me! I didn't have time to much manual testing here, but we can get more eyes on it once it lands.
Because
This pull request
Issue that this pull request solves
Closes: FXA-12344
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Normal layout:

Split Layout:

Mobile:

Other information (Optional)
Technically pair routes need this card spinner as well, but I don't think it's worth the effort to replicate this in Backbone