Skip to content

Add <AuthLayout> to share layout of login page with register & forgot password pages#10640

Merged
djhi merged 3 commits into
nextfrom
auth-layout
Apr 9, 2025
Merged

Add <AuthLayout> to share layout of login page with register & forgot password pages#10640
djhi merged 3 commits into
nextfrom
auth-layout

Conversation

@djhi
Copy link
Copy Markdown
Contributor

@djhi djhi commented Apr 2, 2025

Problem

When building several pages linked to authentication, we have to repeat Several elemens between pages.

Solution

  • Extract and rename the Root component from Login to AuthLayout and export it. Do not embark the avatar, the auth check, or the background.

How To Test

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes one or several stories (if not possible, describe why)

@djhi djhi added the WIP Work In Progress label Apr 2, 2025
@djhi djhi added RFR Ready For Review and removed WIP Work In Progress labels Apr 4, 2025
@fzaninotto
Copy link
Copy Markdown
Member

The new component is not exported

Comment on lines +55 to +57
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue: : There aren't many differences with and without. Can you make any other (more visual) changes?

'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)',

[`& .${AuthLayoutClasses.card}`]: {
minWidth: 300,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't this be a prop passed down to the card instead?

Copy link
Copy Markdown
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 get this comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Are you confusing Dialog and Card?

@djhi djhi merged commit 3f7be19 into next Apr 9, 2025
16 checks passed
@djhi djhi deleted the auth-layout branch April 9, 2025 09:27
@djhi djhi added this to the 5.8.0 milestone Apr 9, 2025
@fzaninotto fzaninotto changed the title Introduce <AuthLayout> Add <AuthLayout> to share layout of login page with register & forgot password pages Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFR Ready For Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants