Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/template-retail-react-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v6.0.0 (TBD)
(Passwordless/Social PRs that will be unified when merging to develop)
- Add a "Back" button for Standard Login https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2208

## v5.1.0-dev (TBD)

- [BUG] Fixed "getCheckboxProps is not a function" when rendering checkout page in generated app.[#2140](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2140)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const PasswordlessLogin = ({
<StandardLogin
form={form}
handleForgotPasswordClick={handleForgotPasswordClick}
setShowPasswordView={setShowPasswordView}
hideEmail={true}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const StandardLogin = ({
handleForgotPasswordClick,
hideEmail = false,
isSocialEnabled = false,
setShowPasswordView,
idps = []
}) => {
return (
Expand All @@ -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

<Button
type="submit"
onClick={() => {
Expand All @@ -50,6 +51,14 @@ const StandardLogin = ({
<SocialLogin form={form} idps={idps} />
</>
)}
<Button
onClick={() => setShowPasswordView(false)}
borderColor="gray.500"
color="blue.600"
variant="outline"
>
<FormattedMessage defaultMessage="Back" id="login_form.button.back" />
</Button>
</Stack>
</Stack>
)
Expand All @@ -60,6 +69,7 @@ StandardLogin.propTypes = {
handleForgotPasswordClick: PropTypes.func,
hideEmail: PropTypes.bool,
isSocialEnabled: PropTypes.bool,
setShowPasswordView: PropTypes.func,
idps: PropTypes.arrayOf(PropTypes.string)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('StandardLogin component', () => {
expect(screen.getByLabelText('Email')).toBeInTheDocument()
expect(screen.queryByLabelText('Password')).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Sign In'})).toBeInTheDocument()
expect(screen.getByRole('button', {name: 'Back'})).toBeInTheDocument()
})

test('renders properly when hideEmail is true', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,12 @@
"value": "Apple"
}
],
"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

}
],
"login_form.button.continue_securely": [
{
"type": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,12 @@
"value": "Apple"
}
],
"login_form.button.back": [
{
"type": 0,
"value": "Back"
}
],
"login_form.button.continue_securely": [
{
"type": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4761,6 +4761,20 @@
"value": "]"
}
],
"login_form.button.back": [
{
"type": 0,
"value": "["
},
{
"type": 0,
"value": "Ɓȧȧƈķ"
},
{
"type": 0,
"value": "]"
}
],
"login_form.button.continue_securely": [
{
"type": 0,
Expand Down
3 changes: 3 additions & 0 deletions packages/template-retail-react-app/translations/en-GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,9 @@
"login_form.button.apple": {
"defaultMessage": "Apple"
},
"login_form.button.back": {
"defaultMessage": "Back"
},
"login_form.button.continue_securely": {
"defaultMessage": "Continue Securely"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/template-retail-react-app/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,9 @@
"login_form.button.apple": {
"defaultMessage": "Apple"
},
"login_form.button.back": {
"defaultMessage": "Back"
},
"login_form.button.continue_securely": {
"defaultMessage": "Continue Securely"
},
Expand Down
Loading