@W-21094171: Fix Resend Code for OTP modal#3624
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
85f1caa to
6b1178d
Compare
|
Aside: could you update the isomorphic sdk version in commerce-sdk-react to v5.0.0? 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? |
There was a problem hiding this comment.
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..." |
There was a problem hiding this comment.
If we're no longer showing this verification message, what kind of UI feedback does the users see during this time?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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:
- Entering the OTP
- After I enter the last digit, the app automatically submits the OTP for me (without my clicking a button)
- 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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
@vmarta I have reached out to our UX designer with these concerns. Thanks for the feedback.
There was a problem hiding this comment.
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.
* 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>
fdcfc99 to
1cbbf51
Compare
vmarta
left a comment
There was a problem hiding this comment.
Meanwhile, I'll +1 this PR.
* 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>
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
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization