Skip to content

Conversation

@MagentaManifold
Copy link
Contributor

@MagentaManifold MagentaManifold commented Nov 14, 2025

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 pull request

  • creates a loading spinner card component and use it in auth flows

Issue that this pull request solves

Closes: FXA-12344

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Normal layout:
image

Split Layout:
image

Mobile:
image

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

@MagentaManifold MagentaManifold marked this pull request as ready for review November 14, 2025 21:41
@MagentaManifold MagentaManifold requested a review from a team as a code owner November 14, 2025 21:41
@MagentaManifold MagentaManifold marked this pull request as draft November 17, 2025 20:25
@MagentaManifold
Copy link
Contributor Author

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]>
@MagentaManifold MagentaManifold marked this pull request as ready for review November 18, 2025 16:18
*/
title?: string;
children: React.ReactNode;
children?: React.ReactNode;
Copy link
Contributor

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?

Copy link
Contributor Author

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

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?

Copy link
Contributor Author

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

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.

Copy link
Contributor Author

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

Copy link
Contributor

@dschom dschom left a 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.

@MagentaManifold MagentaManifold merged commit 6daf031 into main Nov 19, 2025
19 checks passed
@MagentaManifold MagentaManifold deleted the FXA-12344 branch November 19, 2025 18:13
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