Skip to content

@W-21094171: Fix Resend Code for OTP modal#3624

Merged
syadupathi-sf merged 22 commits intodevelopfrom
dannyphan2000.W-21094171.fix-resend-otp
Feb 5, 2026
Merged

@W-21094171: Fix Resend Code for OTP modal#3624
syadupathi-sf merged 22 commits intodevelopfrom
dannyphan2000.W-21094171.fix-resend-otp

Conversation

@dannyphan2000
Copy link
Contributor

Try to register or login in Checkout with OTP by entering the email. An OTP code will be sent to the inbox. The user has the option to Resend Code.
Result: No OTP code is sent to the inbox. No additional call was made.
Expected: Another OTP code will be sent to the inbox.

Also fixed the OTP modal UI. And introduced a reset cooldown timer property on the component (default to 30 seconds)

Description

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)

How to Test-Drive This PR

  • (step1)

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)

@dannyphan2000 dannyphan2000 requested a review from a team as a code owner January 30, 2026 19:21
@dannyphan2000 dannyphan2000 added the skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated label Jan 30, 2026
@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jan 30, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Base automatically changed from feature/1cc_merge to develop February 2, 2026 18:10
@syadupathi-sf syadupathi-sf requested a review from a team as a code owner February 2, 2026 18:10
@syadupathi-sf syadupathi-sf force-pushed the dannyphan2000.W-21094171.fix-resend-otp branch from 85f1caa to 6b1178d Compare February 2, 2026 22:03
syadupathi-sf
syadupathi-sf previously approved these changes Feb 2, 2026
@vmarta
Copy link
Contributor

vmarta commented Feb 3, 2026

Aside: could you update the isomorphic sdk version in commerce-sdk-react to v5.0.0?

"commerce-sdk-isomorphic": "5.0.0-preview.1",

The v5 was released earlier today. Thanks.

@vmarta this shows as 5.0.0-dev on develop. I was expecting to see 5.0.0. Is that a correct expectation?

Copy link
Contributor

@vmarta vmarta left a comment

Choose a reason for hiding this comment

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

The PR looks good overall. I think the biggest concern is what the UI looks like after all the changes, in particular with the code verification. Let me know if there's a link where we can see the UI in action.

https://ecom-1cc-poc-feb-2026.sfdc-8tgtt5-ecom1.exp-delivery.com/

"otp.message.resend_cooldown": [
{
"type": 0,
"value": "Verifying code..."
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're no longer showing this verification message, what kind of UI feedback does the users see during this time?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please see https://ecom-1cc-poc-feb-2026.sfdc-8tgtt5-ecom1.exp-delivery.com/ - there is a cooldown timer once the OTP is sent out.

Copy link
Contributor

Choose a reason for hiding this comment

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

@syadupathi-sf the cooldown timer is not a good substitute for the code verification. That timer is meant to limit the use of the Resend Code button (which needs to be disabled too if the timer is still on).

The UI we had previously is clear that some verification is happening after I enter the OTP. So this time around I was expecting to see something similar:

  1. Entering the OTP
  2. After I enter the last digit, the app automatically submits the OTP for me (without my clicking a button)
  3. Because of the auto-submit, it is crucial to show some UI feedback to indicate what's going on, which is the app verifying the submitted OTP

However, what we see is the Checkout as a Guest button highlighted in blue instead. And there is no verification message.

Try the OTP flow again with slower internet access to simulate spotty network, and the effect is more clearly seen:

Arc.2026-02-04.at.10.06.10.mp4

Copy link
Collaborator

@syadupathi-sf syadupathi-sf Feb 4, 2026

Choose a reason for hiding this comment

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

Resend Code button (which needs to be disabled too if the timer is still on).

UX (Simran Bansal) recommended to not disable the Resend code button and instead add a cool down timer. The Resend Code button doesn't function until the timer expires which is UX's desired behavior.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@vmarta here's the list of UX recommendation for the OTP modal. The implementation is based on the suggested UX.

  • Action buttons should be enabled/visible at all time
  • The countdown appears with 30 seconds cooldown by default. Resend button should still be enabled/visible, but clicking it during cooldown will not trigger/send OTP email. After cooldown is complete, then hitting Resend Button will send OTP email.
  • Entering invalid code will also result in red OTP boxes (with red error message underneath)
  • No more “verifying code” message. During verification, buttons are visible/enabled but does not do any actions.

Copy link
Contributor

Choose a reason for hiding this comment

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

@syadupathi-sf thanks for sharing the list of UX recommendations. All right to the action buttons being enabled all the time.

No more “verifying code” message. During verification, buttons are visible/enabled but does not do any actions.

But I still think that no verification message is a regression. Have we considered what happens if the verification step got stuck (spotty network did not receive a response)? Then there is no feedback at all (no loading spinner or text message) that indicate what the app is trying to do at that time.

Yes, our UX designer gave a list of things for us engineers to implement. But we can think of this as a design feedback. Something is missing that's perhaps not considered in the initial design phase.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@vmarta I have reached out to our UX designer with these concerns. Thanks for the feedback.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ux prefers a spinner/loader instead of the "Verifying code" text since it would be easier to visually digest. We have created W-21190081 to address it.

syadupathi-sf
syadupathi-sf previously approved these changes Feb 4, 2026
syadupathi-sf and others added 16 commits February 4, 2026 16:11
* W-20892497 Show Phone number in Contact Info summary

* fix lint
* W-20892592 Remove gift messaging for multi shipment

* translations
…phone for user registration (#3583)

* W-20892530 Billing Address Validation

* W-20892577 save contact info phone
* fix sdk tests and app bundle size

* fix lint
* address first set of comments

* address rest of code review comments

* reverting default.js changes

* fix package versions

* shipping options fix

* attempt to fix flaky tests
Signed-off-by: d.phan <d.phan@salesforce.com>
Signed-off-by: d.phan <d.phan@salesforce.com>
Signed-off-by: d.phan <d.phan@salesforce.com>
Signed-off-by: d.phan <d.phan@salesforce.com>
Signed-off-by: d.phan <d.phan@salesforce.com>
@syadupathi-sf syadupathi-sf force-pushed the dannyphan2000.W-21094171.fix-resend-otp branch from fdcfc99 to 1cbbf51 Compare February 4, 2026 21:18
vmarta
vmarta previously approved these changes Feb 5, 2026
Copy link
Contributor

@vmarta vmarta left a comment

Choose a reason for hiding this comment

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

Meanwhile, I'll +1 this PR.

syadupathi-sf
syadupathi-sf previously approved these changes Feb 5, 2026
@syadupathi-sf syadupathi-sf dismissed stale reviews from vmarta and themself via 39e278b February 5, 2026 19:16
@syadupathi-sf syadupathi-sf requested a review from vmarta February 5, 2026 19:16
@syadupathi-sf syadupathi-sf merged commit 32ff733 into develop Feb 5, 2026
42 of 43 checks passed
@syadupathi-sf syadupathi-sf deleted the dannyphan2000.W-21094171.fix-resend-otp branch February 5, 2026 20:02
unandyala pushed a commit that referenced this pull request Feb 10, 2026
* One click checkout

* changes to fix install, tests and lint - needs to be reviewed

* revert the test change in pwa-kit-runtime

* @W-20892497 Show Phone number in Contact Info summary (#3576)

* W-20892497 Show Phone number in Contact Info summary

* fix lint

* @W-20892592 Remove gift messaging for multi shipment (#3579)

* W-20892592 Remove gift messaging for multi shipment

* translations

* @W-20892530 @W-20892577 Billing Address Validation and Using contact phone for user registration (#3583)

* W-20892530 Billing Address Validation

* W-20892577 save contact info phone

* Fix SDK tests (#3593)

* fix sdk tests and app bundle size

* fix lint

* @ W-20540715 Address 1CC feature branch review comments (#3619)

* address first set of comments

* address rest of code review comments

* reverting default.js changes

* fix package versions

* shipping options fix

* attempt to fix flaky tests

* passwordless mode updates

* @W-21094171: Fix Resend Code for OTP modal

Signed-off-by: d.phan <d.phan@salesforce.com>

* add translations

Signed-off-by: d.phan <d.phan@salesforce.com>

* fix lint

Signed-off-by: d.phan <d.phan@salesforce.com>

* update component per UX alignment

Signed-off-by: d.phan <d.phan@salesforce.com>

* no actions during verification

Signed-off-by: d.phan <d.phan@salesforce.com>

* revert to generic error message as per code review comment

* transaltion changes

* fix the rebase issue

* update isomorphic version

* update isomorhic in dev dependencies

* Updating another dev dependency for isomorphic version

* @W-21094171: Fix Resend Code for OTP modal

Signed-off-by: d.phan <d.phan@salesforce.com>

* fix package versions

---------

Signed-off-by: d.phan <d.phan@salesforce.com>
Co-authored-by: Sushma Yadupathi <syadupathi@salesforce.com>
Co-authored-by: syadupathi-sf <66088780+syadupathi-sf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants