Skip to content

Optional first / last name fields on sign up form - #8

Merged
joshestein merged 5 commits into
masterfrom
username-during-signup
Jul 22, 2026
Merged

Optional first / last name fields on sign up form#8
joshestein merged 5 commits into
masterfrom
username-during-signup

Conversation

@joshestein

@joshestein joshestein commented Jul 16, 2026

Copy link
Copy Markdown

Updates register.ftl to take optional first / last name (side-by-side, stacking on mobile, above email) fields. Fills a gap: email/password sign-ups left the account name empty until the /account welcome modal prompted later.

I also needed to update the input.ftl file - without the modification, the invalidation div always renders, which leads to 8px of excess margin before the first/last name inputs and the other input fields. With the change the div will only render when there is an error message present, so the excess margin disappears.

Keycloak's built-in full-name mapper joins firstName+lastName into the OIDC name claim, which the website already reads on first login to backfill userTable.name. No consumer code changes. /account stays the source of truth (single-name, not written back to Keycloak).

⚠️ Rollout - ordered

Inert until the realm declares the attributes; if the theme ships first, Keycloak silently drops submitted names.

  1. Admin (live customers realm), first: add optional firstName/lastName to User Profile JSON (no required key), and confirm the profile Full Name mapper has "Add to ID token" ON.
  2. Merge → cut theme release.
  3. Monorepo: bump the pin in apps/login/tools/getBluedotKeycloakTheme.sh → deploys apps/login.

Notes

  • Optional = prefill only; welcome modal still covers skippers.
  • Keycloak's first/last goes stale after any /account edit (nothing reads it back) - accepted.
image image

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@joshestein, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 714b028f-fa15-4b53-a1ab-f934e4b69c48

📥 Commits

Reviewing files that changed from the base of the PR and between d4ab54a and 303f347.

📒 Files selected for processing (1)
  • src/login/register.ftl

Walkthrough

The registration template now renders optional firstName and lastName inputs, binds their values, and includes per-field validation messages. Shared input message rendering now requires both an invalid field and non-empty message content.

Changes

Registration Name Fields

Layer / File(s) Summary
Optional name inputs and validation
src/login/register.ftl
Adds optional first and last name fields with bound values, invalid states, sanitized messages, and display-message handling.
Conditional input messages
src/login/components/atoms/input.ftl
Renders the message container only when invalid is true and message has content.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

Poem

A rabbit adds two fields with care,
First and last names nestled there.
Empty errors fade from sight,
Valid messages render right,
Forms now hop along just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: optional first and last name fields on the sign-up form.
Description check ✅ Passed The description directly matches the changes, covering the new name fields and the input template spacing fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch username-during-signup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@joshestein
joshestein requested a review from marn-in-prod July 20, 2026 14:04
@joshestein

joshestein commented Jul 21, 2026

Copy link
Copy Markdown
Author

@Will-Howard or @marn-in-prod can I get eyes / explicit approval please? Merge bypassing is not enabled on this repo and I don't have permissions to change that.

@Will-Howard

Copy link
Copy Markdown

@joshestein sorry I didn't see the earlier review request, I'll review this today

@Will-Howard Will-Howard left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nothing blocking, just some nits. Feel free to accept or reject my "(optional)" suggestion

Comment thread src/login/register.ftl Outdated
Comment thread src/login/register.ftl Outdated
Comment thread src/login/register.ftl Outdated

@marn-in-prod marn-in-prod left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. I'm generally fine with leaving autofocus on (Will's comment) but it's not a big deal either way

joshestein and others added 3 commits July 22, 2026 10:55
Co-authored-by: Will Howard <w.howard256+github@gmail.com>
Co-authored-by: Will Howard <w.howard256+github@gmail.com>
Co-authored-by: Will Howard <w.howard256+github@gmail.com>
@joshestein
joshestein enabled auto-merge (squash) July 22, 2026 09:02
@joshestein
joshestein merged commit 4fa459c into master Jul 22, 2026
2 checks passed
@joshestein
joshestein deleted the username-during-signup branch July 22, 2026 09:02
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