Refresh sign-in / register / forgot-password pages with dark theme#5343
Refresh sign-in / register / forgot-password pages with dark theme#5343FadhlanR wants to merge 6 commits into
Conversation
Drop the white auth-container "platter" and apply shadcn-style theme aliases (--background, --foreground, --border, --muted-foreground, --ring) on the wrapper so BoxelInput and the secondary-dark Button kind re-theme automatically across login, register, and forgot-password. Add a multi-color Google G icon to the Sign-in-with-Google CTA, switch both secondary CTAs to secondary-dark with a contrast nudge so the dark buttons sit a hair lighter than the page, remove the "or" dividers, and move the Boxel logo to the upper-left of the viewport. No change to the SSO flow, the GOOGLE_AUTH_ENABLED gate, or the password login task. Refs: CS-11712 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Preview deploymentsHost Test Results 1 files ±0 1 suites ±0 2h 27m 4s ⏱️ + 21m 27s Results for commit c476fa3. ± Comparison against earlier commit 2a0aaf5. Realm Server Test Results 1 files ±0 1 suites ±0 8m 49s ⏱️ -43s Results for commit c476fa3. ± Comparison against earlier commit 2a0aaf5. |
- Sign-in: Google CTA + "OR USE YOUR EMAIL" divider now sit above the email form, with a subtitle introducing the Google flow. The "Create a new Boxel account" secondary button is replaced by a footer text link. - "Signing you in with Google" and "Email validation complete" now render as centered headlines paired with a green LoadingIndicator. - Registration form: positive validation hints (name available / password is valid / passwords match) appear below each field once valid. - Invite-code screen: heading split out from the field label, copy refers to Boxel rather than "this site", and the input gains a placeholder. - Awaiting-validation: trailing period dropped from the heading; Resend Email button spans the column. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Page background is #191624 and the auth container fills the viewport (min-height: 100vh) so the form stays vertically and horizontally centered on every breakpoint. - Primary CTAs (Sign In, Create Account, Next, Reset Your Password, Resend Email, Reset Password, Sign In to Boxel) use #00ffba / #000 when enabled and #444051 / #817c93 when disabled. - Secondary CTAs (Continue with Google, Login with an existing account, Back to login) sit on the page bg with a #525252 1px border and #fff text. - "Forgot password?" and the "Don't have an account?" prompt render in #7f7c8c (the muted-foreground alias) to match the comps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop the explicit 500 weight on the sign-in subtitle so it inherits the font-sm default instead of looking heavier than the surrounding muted copy. - Bring the registration field error messages in line with the other small helper text by setting font: 500 var(--boxel-font-xs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace raw hex that duplicated existing boxel tokens or the auth aliases (highlight/light/dark, --background/--border/--foreground), centralize the secondary-button hover color as --auth-secondary-hover-bg, drop the no-op --icon-bg-color on the logo, and switch the auth canvas to 100dvh. Assert the username/password/confirm validation hints in the registration happy-path spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a0aaf5aa1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [data-test-login-btn] { | ||
| --boxel-button-color: var(--auth-primary-bg); | ||
| --boxel-button-text-color: var(--auth-primary-text); | ||
| } | ||
| [data-test-login-btn]:disabled { | ||
| --boxel-button-color: var(--auth-primary-disabled-bg); | ||
| --boxel-button-text-color: var(--auth-primary-disabled-text); | ||
| --boxel-button-border: none; |
There was a problem hiding this comment.
Use production selectors for button palette
The repo guidance says data-test-* attributes are stripped from production and must not be used for runtime styling. In production these selectors will not match, so the login button loses the explicit auth palette/disabled overrides; the same pattern is repeated in register-user.gts and forgot-password.gts. Please attach these styles to a class or non-test data-* attribute instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
ugh how did this pass lint
There was a problem hiding this comment.
[Claude Code 🤖]
Fixed in c476fa3. Switched all four [data-test-*-btn] selectors over to .kind-primary — that's the class the Button component actually emits for @kind='primary', and it's scoped by glimmer-scoped-css's data-scopedcss-* attribute so it stays scoped without depending on test-only attributes. Same change applied to login.gts, register-user.gts, and forgot-password.gts.
There was a problem hiding this comment.
[Claude Code 🤖]
Good catch — fixed in c476fa3. The hbs/eslint passes didn't flag it because [data-test-*] is valid CSS; the production-strip step that drops the attribute happens later in the build. Switched to .kind-primary so the palette survives a prod build.
There was a problem hiding this comment.
Pull request overview
Refreshes the Matrix auth UI (login/register/forgot-password) to use a dark-theme wrapper palette and updated layouts, with a new multi-color Google icon and updated registration UX hints, while aligning Playwright tests with the new UI states.
Changes:
- Reworks auth page wrapper (
AuthContainer) to apply shadcn-style theme alias variables and a shared auth button palette. - Updates login/register/forgot-password components with new dark-theme styling, layout tweaks, placeholders, and registration validation hints.
- Adds
GoogleColoricon to@cardstack/boxel-ui/iconsand updates matrix Playwright tests/helpers to match copy + new UI affordances.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/matrix/tests/registration-with-token.spec.ts | Adds assertions for new registration validation-hint elements. |
| packages/matrix/helpers/index.ts | Updates email-validation copy expectation (drops trailing period). |
| packages/host/app/components/matrix/register-user.gts | Adds placeholders, validation hints, invite-code copy/layout changes, and dark-theme styling. |
| packages/host/app/components/matrix/login.gts | Reworks login flow layout, Google CTA section, and dark-theme styling. |
| packages/host/app/components/matrix/forgot-password.gts | Removes “or” divider, adjusts CTAs, and applies dark-theme styling updates. |
| packages/host/app/components/matrix/auth-container.gts | Replaces “platter” container with full-viewport dark wrapper + logo positioning and CSS variables. |
| packages/boxel-ui/addon/src/icons/google-color.gts | Introduces new auto-generated multi-color Google “G” icon component. |
| packages/boxel-ui/addon/src/icons.gts | Registers and exports GoogleColor icon. |
| packages/boxel-ui/addon/raw-icons/google-color.svg | Adds the raw SVG source for the new icon. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [data-test-login-btn] { | ||
| --boxel-button-color: var(--auth-primary-bg); | ||
| --boxel-button-text-color: var(--auth-primary-text); | ||
| } | ||
| [data-test-login-btn]:disabled { | ||
| --boxel-button-color: var(--auth-primary-disabled-bg); | ||
| --boxel-button-text-color: var(--auth-primary-disabled-text); | ||
| --boxel-button-border: none; | ||
| } |
There was a problem hiding this comment.
[Claude Code 🤖]
Fixed in c476fa3 — replaced [data-test-login-btn] with .kind-primary, which is the class the Button component renders for @kind='primary'.
| [data-test-register-btn], | ||
| [data-test-next-btn] { | ||
| --boxel-button-color: var(--auth-primary-bg); | ||
| --boxel-button-text-color: var(--auth-primary-text); | ||
| } | ||
| [data-test-register-btn]:disabled, | ||
| [data-test-next-btn]:disabled { | ||
| --boxel-button-color: var(--auth-primary-disabled-bg); | ||
| --boxel-button-text-color: var(--auth-primary-disabled-text); | ||
| --boxel-button-border: none; | ||
| } |
There was a problem hiding this comment.
[Claude Code 🤖]
Fixed in c476fa3 — replaced both [data-test-register-btn] and [data-test-next-btn] with .kind-primary. Also dropped the duplicate .resend-email color rules since that button is @kind='primary' too and now picks up the palette from the same selector.
| [data-test-reset-your-password-btn], | ||
| [data-test-resend-validation-btn], | ||
| [data-test-reset-password-btn], | ||
| [data-test-back-to-login-btn] { | ||
| --boxel-button-color: var(--auth-primary-bg); | ||
| --boxel-button-text-color: var(--auth-primary-text); | ||
| } | ||
| [data-test-reset-your-password-btn]:disabled, | ||
| [data-test-resend-validation-btn]:disabled, | ||
| [data-test-reset-password-btn]:disabled, | ||
| [data-test-back-to-login-btn]:disabled { | ||
| --boxel-button-color: var(--auth-primary-disabled-bg); | ||
| --boxel-button-text-color: var(--auth-primary-disabled-text); | ||
| --boxel-button-border: none; | ||
| } |
There was a problem hiding this comment.
[Claude Code 🤖]
Fixed in c476fa3 — collapsed all four [data-test-*-btn] selectors down to a single .kind-primary rule.
| gap: var(--boxel-sp-xxxs); | ||
| margin: var(--boxel-sp-xxs) 0 0; |
There was a problem hiding this comment.
all new code should use the current css var names (2xs, 3xs etc) instead of the deprecated ones
data-test-* attributes are stripped from production builds, so styling the auth primary CTAs through those selectors silently broke the palette outside dev/test. Target the .kind-primary class emitted by the Button component instead — scoped via glimmer-scoped-css and production-safe.
There was a problem hiding this comment.
I recommend extracting the dark styled button/input components within the host package and moving the styling there, since they are used in multiple templates. Keep the css in the templates minimal.
What we didn't realize when discussing yesterday is that you can't actually use the theming system here because it is only injected in cards.
Summary
--background,--foreground,--border,--muted-foreground,--ring) on the wrapper soBoxelInputand thesecondary-darkButton kind re-theme automatically across login, register, and forgot-password — no per-component dark styling.@kind='secondary-dark', add a multi-color Google G prefix on the Sign-in-with-Google button, remove theordivider, fix the forgot-password link color.secondary-dark, dark-friendly text colors on titles / paragraphs / bullet lists / inline links).GoogleColoricon (multi-color SVG) in@cardstack/boxel-ui/icons.#191624page bg,#00ffba/#000primary CTA,#444051/#817c93disabled primary,#191624/#525252/#fffsecondary CTA,#7f7c8cmuted helper text; auth wrapper fills the viewport so the form stays vertically + horizontally centered.Refs: CS-11712
Preview note
Google sign-in is not enabled in staging or production, so the "Continue with Google" button, the "OR USE YOUR EMAIL" divider, and the Google-specific subtitle copy above the email form will not render in the preview. To exercise those states locally, run the host against a Synapse that advertises the
oidc-googleIDP withGOOGLE_AUTH_ENABLED=true. Here's the screenshot:Out of scope
m.login.ssodetection,doGoogleSso,consumeSsoLoginToken), theGOOGLE_AUTH_ENABLEDgate, and the password login task — untouched.BoxelInputvariants / new theme tokens beyond what's already invariables.css.Test plan
--boxel-highlightfocus ring; "Forgot password?" and "Don't have an account?" copy render in#7f7c8c; the Sign In CTA renders disabled#444051/#817c93and enabled#00ffba/#000; secondary CTAs render#191624bg with#525252border and#ffftext.Resend Emailspans the column.?sid=&clientSecret=URL params) → success; secondary CTAs match the palette above; the reset-error inline link is legible.LoadingIndicatorunderneath.data-test-*hooks across login / register-user / forgot-password still resolve.pnpm testinpackages/hostgreen;pnpm lintclean (modulo the pre-existing baseline boxel-uiTS2307noise).🤖 Generated with Claude Code