Skip to content

feat(emails): Add a countdown for email resending on signup and signin#19801

Merged
vbudhram merged 1 commit intomainfrom
fxa-12796
Dec 31, 2025
Merged

feat(emails): Add a countdown for email resending on signup and signin#19801
vbudhram merged 1 commit intomainfrom
fxa-12796

Conversation

@vbudhram
Copy link
Copy Markdown
Contributor

Because

  • We want to disable the resend emai button for 30second

This pull request

  • Adds a countdown timer when the user can resend the email

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-12796

Checklist

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Screenshot 2025-12-16 at 10 35 24 AM

Other information (Optional)

I tried to make this a reuseable component but that was a much bigger refactor.

@vbudhram vbudhram requested review from a team as code owners December 16, 2025 15:40
signin-token-code-resend-code-link = Email new code.
# Countdown message shown when user must wait before resending code
# { $seconds } represents the number of seconds remaining
signin-token-code-resend-code-countdown = Email new code in { $seconds }s
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.

Suggested change
signin-token-code-resend-code-countdown = Email new code in { $seconds }s
signin-token-code-resend-code-countdown =
{ $seconds ->
[one] Email new code in { $seconds } second
*[other] Email new code in { $seconds } seconds
}

setResendCodeLoading(true);
try {
await session.sendVerificationCode();
// Start 30 second countdown
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.

Should the countdown start after setResendCodeLoading(false); ?

Comment thread packages/fxa-settings/src/pages/Signup/ConfirmSignupCode/en.ftl Outdated
@vbudhram vbudhram merged commit c10cdf2 into main Dec 31, 2025
19 checks passed
@vbudhram vbudhram deleted the fxa-12796 branch December 31, 2025 19:34
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