Repository navigation
Verify the sign-up email code on Enter - #1536
Merged
Merged
Conversation
The code field and the Verify Email button sat outside a form, so Enter did nothing and the user had to click. Wrap them in a form that submits once the code has six digits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On the sign-up email verification step (
/login, stepverify-email), pressing Enter in the code field did nothing: the input and the "Verify Email" button were not inside a<form>, and the button only had anonClick. Users had to click the button. Reported by Matteo on Cloud after sign-up (/login?redirect=/start-trial).Changes
packages/frontend/src/app/login/page.tsx: the code input and the button are now in a<form>. ItsonSubmitcallshandleVerifyCodeonly when the code has 6 digits and no request is running, the same rule as the button'sdisabled. The button istype="submit". The resend link stays outside the form.packages/frontend/tests/e2e/neutral-signup-and-billing.spec.ts: new test. Enter with 5 digits does nothing; Enter with 6 digits verifies once and continues to the authorization page.app/verify-email/page.tsxhas no code input (only links), so nothing to change there.Same in Cloud and self-hosted: the step is shared by both.
Type
Testing
In
packages/frontend:npx tsc --noEmit -p tsconfig.json: no errorsnpx eslint src/app/login/page.tsx tests/e2e/neutral-signup-and-billing.spec.ts: 0 errors, 1 existing warning (trialErrunused, line 588, not from this change)npx playwright test tests/e2e/neutral-signup-and-billing.spec.ts --workers=1: 7 passedpage.tsxchange: 1 failed (the URL never leaves the code screen), so it pins the bug.Checklist
Related Issues
None (reported in chat).