Skip to content

fix(heybox-up): theme the login modal to match the active preset - #268

Merged
CYoJkoY merged 1 commit into
mainfrom
issue-267-heybox-up-login-modal-theme
Nov 29, 2026
Merged

CYoJkoY merged 1 commit into
mainfrom
issue-267-heybox-up-login-modal-theme

Conversation

@CYoJkoY

@CYoJkoY CYoJkoY commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Linked Issue

Closes #267

Change summary

  • Remove the old forced-light login block (color-scheme: light, background-color:#fff, #14191e text) that kept the modal's left form panel white while the theme's global input rules still repainted the fields dark. That mismatch produced the half-light, half-dark modal in the report.
  • Add a themed login-modal rule set gated on :root.heybox-up-theme:not([data-heybox-up-theme="light"]) so the whole modal follows the active preset while the light preset stays byte-for-byte the site's own rendering. The set covers: .website-login transparent fill + text, __panel card radius/border/shadow, __left surface, __right raised-to-subtle gradient, __tabs divider and __tab muted/active text with an accent active underline, __field subtle surface, __field-prefix and __field-prefix-arrow, __field-divider, text inputs (transparent fill so the field surface shows through, themed border/text, specificity 0,6,1 over the global 0,3,1 input rule), __input::placeholder, __code-button and its disabled state, __submit accent fill (shorthand clears the site gradient) with on-accent text, agreement text/checkbox/link, and the QR title/description.
  • Keep the QR canvas on the site's white background for scan reliability, adding only a themed inset border ring; leave the close icon, logo text and QR overlay alone because they already sit on the dark mask.
  • Bump heybox-up to 0.12.21 and document the login-modal theming, the QR-canvas exception and the unchanged light preset.
  • Add a login modal theme contract test block asserting: every login rule is scoped to non-light presets with no leftover color-scheme/#fff; the panel, fields, submit and active-tab underline use theme tokens; text inputs are transparent and the QR canvas keeps no background override.

Verification & Dependencies

  • pnpm typecheck passes across all project tsconfigs.
  • pnpm test passes: 59 files / 918 tests, including the 3 new login-modal contract tests.
  • pnpm build -- --target heybox-up writes dist/heybox-up.user.js with @version 0.12.21; the bundle carries 26 login-modal rules and no forced-light login selector (the only remaining color-scheme: light is the legitimate light-preset menu-variable block).
  • Selectors re-checked against the real site login.css: every targeted class exists (__panel, __left, __right, __tabs, __tab, __field, __field-prefix, __field-prefix-arrow, __field-divider, __input, __code-button, __submit, __agreement*, __qr-title, __qr-box, __qr-desc), the submit gradient linear-gradient(45deg,#464b50,#14191e) and __field #f3f4f5 are the values now overridden, and __qr-box really hard-codes background:#fff.
  • Per-preset preview (night, OLED, paper, mist, light) of the site login.css plus the full THEME_CSS: panels and controls themed on every non-light preset, QR stays white, light preset identical to the site. Measured QR-description contrast rose from 3.00-4.27:1 to 10.5-14.6:1 across presets.
  • applyTheme always writes a resolved data-heybox-up-theme id (dark|oled|light|paper|mist), so the :not([data-heybox-up-theme="light"]) gate is correct.
  • No new runtime dependencies, network endpoints, or stored data.

Review conclusion

  • Reviewed head: 1c5631a.
  • Single-agent source review: PASS, calculated score 4.85/5.00. No unresolved P0, P1, P2, P3, or P4 findings. This is not an independent review attestation.
  • Specificity checked: the transparent-input rule resolves to 0,6,1 and beats the global dark input rule (0,3,1) even with both !important; the submit shorthand background resets the site's background-image gradient; the QR-canvas rule deliberately omits background-color so the site's white stays.
  • Light preset is untouched by construction (the gate excludes light), so the site's original modal is preserved exactly.
  • C1: explicit :not() guard instead of ad-hoc overrides; C2: existing theme tokens only; C3: flat, single-level rule list; C4: gate excludes light early; C5: reuses the established .website-login namespace; C6: one rule per element; C7: no new tunable data.

Permission Notice

This change is limited to the heybox-up login-modal styling, its style-contract test, the version bump, and the doc entry. It adds no grants, network endpoints, telemetry, or write actions; it only repaints existing DOM with existing theme tokens.

@CYoJkoY
CYoJkoY merged commit 2da2d6a into main Nov 29, 2026
1 check passed
@CYoJkoY
CYoJkoY deleted the issue-267-heybox-up-login-modal-theme branch November 29, 2026 03:53
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.

fix(heybox-up): theme the login modal to match the active preset

1 participant