Skip to content

Commit f86b4ea

Browse files
committed
docs(web): design signup name field
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cb465cbe-a93c-4c89-96f5-591e8f0908e3
1 parent 3506055 commit f86b4ea

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Signup Name Design
2+
3+
## Goal
4+
5+
Collect a required name during Firebase email/password signup and persist it as
6+
the Firebase user's display name.
7+
8+
## User Interface
9+
10+
- Show a `Name` field only when the email form is in signup mode.
11+
- Keep the existing email and password fields unchanged.
12+
- Clear field-level and general errors whenever the user switches between sign
13+
in and sign up.
14+
15+
## Signup Flow
16+
17+
1. Validate name, email, and password.
18+
2. Create the Firebase email/password user.
19+
3. Set the new user's Firebase profile `displayName` to the trimmed name.
20+
4. Update the auth store and continue through the existing success redirect.
21+
22+
## Error Handling
23+
24+
- An empty name produces an inline error on the `Name` field.
25+
- Firebase account creation and profile update errors use the existing Firebase
26+
error handling path.
27+
- Switching form modes removes stale errors before rendering the other mode.
28+
29+
## Validation
30+
31+
- Add or update focused component tests if the component has an existing test
32+
harness.
33+
- Run the web lint command and the smallest relevant web test command.

0 commit comments

Comments
 (0)