Skip to content

@W-17526051 - Add a "Back" button for Standard Login #2208

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

Merged
merged 12 commits into from
Jan 21, 2025

Conversation

jeremy-jung1
Copy link
Collaborator

@jeremy-jung1 jeremy-jung1 commented Jan 16, 2025

Description

Add back button to standard login modal/page after password login prompt

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • (change1) Added back button to standard login modal

How to Test-Drive This PR

Passwordless enabled

Passwordless disabled

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@jeremy-jung1 jeremy-jung1 requested a review from a team as a code owner January 16, 2025 23:11
@jeremy-jung1 jeremy-jung1 changed the title @W-17526051 add back button @W-17526051 - Add a "Back" button for Standard Login Jan 16, 2025
"login_form.button.back": [
{
"type": 0,
"value": "Back"
Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry @jeremy-jung1 can we change this to Back to Sign In Options to be consistent with the checkout login page? This is also something we agreed with Trevor on here
Screenshot 2025-01-17 at 1 35 42 PM

Comment on lines 54 to 60
<Button
onClick={() => setShowPasswordView(false)}
borderColor="gray.500"
color="blue.600"
variant="outline"
>
<FormattedMessage defaultMessage="Back to Sign In Options" id="login_form.button.back" />
Copy link
Collaborator

@hajinsuha1 hajinsuha1 Jan 17, 2025

Choose a reason for hiding this comment

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

Sorry testing this again and I realized that this StandardLogin component is rendered differently for each of the 4 passwordless/social combination.

In the case where passwordless is disabled, the password field is shown so there's no need to display the back button.
Screenshot 2025-01-17 at 3 02 47 PM

I think we can simply make this button display when hideEmail is true

@@ -28,7 +29,7 @@ const StandardLogin = ({
handleForgotPasswordClick={handleForgotPasswordClick}
/>
</Stack>
<Stack spacing={6}>
<Stack spacing={2}>
Copy link
Collaborator

@hajinsuha1 hajinsuha1 Jan 17, 2025

Choose a reason for hiding this comment

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

I think this might affect the spacing for when social is enabled and passwordless is disabled and makes the Or Login With text + buttons closer than the figma design

spacing={2}:
Screenshot 2025-01-17 at 3 02 47 PM

I also actually think there's a bug in the spacing where spacing={6} makes the buttons too far:
Screenshot 2025-01-17 at 3 08 08 PM

Would you be able sneak in a spacing fix to ensure the buttons have a spacing of 4 but the "or Login With" keeps a spacing of 6

@alexvuong
Copy link
Collaborator

@jeremy-jung1 I followed the steps listed into the PR description. I can't find option for passwordless listed. Is the deployed successful? the nav can't be loaded.
image

@jeremy-jung1 jeremy-jung1 merged commit c83473d into feature-passwordless-social-login Jan 21, 2025
4 of 29 checks passed
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