Repository navigation
fix(heybox-up): theme the login modal to match the active preset - #268
Merged
Merged
Conversation
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Linked Issue
Closes #267
Change summary
color-scheme: light,background-color:#fff,#14191etext) 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.: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-logintransparent fill + text,__panelcard radius/border/shadow,__leftsurface,__rightraised-to-subtle gradient,__tabsdivider and__tabmuted/active text with an accent active underline,__fieldsubtle surface,__field-prefixand__field-prefix-arrow,__field-divider, text inputs (transparent fill so the field surface shows through, themed border/text, specificity0,6,1over the global0,3,1input rule),__input::placeholder,__code-buttonand its disabled state,__submitaccent fill (shorthand clears the site gradient) with on-accent text, agreement text/checkbox/link, and the QR title/description.heybox-upto0.12.21and document the login-modal theming, the QR-canvas exception and the unchanged light preset.login modal theme contracttest block asserting: every login rule is scoped to non-light presets with no leftovercolor-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 typecheckpasses across all project tsconfigs.pnpm testpasses: 59 files / 918 tests, including the 3 new login-modal contract tests.pnpm build -- --target heybox-upwritesdist/heybox-up.user.jswith@version 0.12.21; the bundle carries 26 login-modal rules and no forced-light login selector (the only remainingcolor-scheme: lightis the legitimate light-preset menu-variable block).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 gradientlinear-gradient(45deg,#464b50,#14191e)and__field#f3f4f5are the values now overridden, and__qr-boxreally hard-codesbackground:#fff.login.cssplus the fullTHEME_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.applyThemealways writes a resolveddata-heybox-up-themeid (dark|oled|light|paper|mist), so the:not([data-heybox-up-theme="light"])gate is correct.Review conclusion
0,6,1and beats the global dark input rule (0,3,1) even with both!important; the submit shorthandbackgroundresets the site'sbackground-imagegradient; the QR-canvas rule deliberately omitsbackground-colorso the site's white stays.light), so the site's original modal is preserved exactly.: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-loginnamespace; C6: one rule per element; C7: no new tunable data.Permission Notice
This change is limited to the
heybox-uplogin-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.