fix: dark/light contrast on 6 chrome surfaces - #1529
Open
ParasxAgarwal wants to merge 1 commit into
Open
Conversation
Dark mode was missing dark: twins on a few chrome surfaces, and two elements had the inverse bug (hardcoded white text, unreadable in light mode). className-only; no behavior, store, or layout change. Missing dark twins: - DropDown menu panel: add dark:divide-slate-700 + dark:ring-white/10 (matches the menu flyout outline). - ViewAllBookmarks panel: bare border had no dark color -> add border-slate-300 + dark:border-slate-700. - Toggle switch knob: add dark:after:border-gray-500. - About dialog tagline: add dark:text-gray-400 (gray-500 too dim). Inverse bugs (unreadable in light mode): - ConfirmDialog title was text-white on the bg-slate-200 light panel -> now text-slate-800 dark:text-white. - Notification text was text-white inside the bg-slate-100 light flyout -> now inherits in light, dark:text-white. The bg-white CANVAS surfaces in Previewer/Device (webview viewport) and DesignOverlay (design backdrop) are intentionally left as-is: the loaded site / design image paints over them, so they must stay neutral in every theme. Verified with the project toolchain: prettier --check matched, eslint clean, tsc --noEmit clean, vitest run 14 files / 69 tests passed. Committed with --no-verify: the husky pre-commit hook cannot spawn cross-env in this monorepo checkout (binary under desktop-app/node_modules/.bin, hook runs from repo root -> ENOENT). The hook's checks (prettier + eslint) pass independently and CI lints via the 'lint' script.
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.
What
Six small, objective dark/light contrast fixes in the app chrome.
className-only — no behavior, store, or layout change.Dark mode was missing
dark:twins on a few surfaces, and two elements had the inverse bug (hardcoded white text that is unreadable in light mode):Missing dark twins (look wrong in dark mode):
DropDownmenu panel — dividers + outline ring had no dark variant → adddark:divide-slate-700+dark:ring-white/10(matches the menu flyout outline).ViewAllBookmarkspanel — the bareborderdefaulted to a light gray with no dark color → addborder-slate-300+dark:border-slate-700.Toggleswitch knob — light-only knob border → adddark:after:border-gray-500.AboutDialogtagline —text-gray-500too dim on the dark panel → adddark:text-gray-400.Inverse bugs (unreadable in light mode):
ConfirmDialogtitle wastext-whiteon the modal panel, which isbg-slate-200in light mode → white-on-light-gray, invisible. Nowtext-slate-800 dark:text-white.Notificationtext wastext-whiteinside the menu flyout, which isbg-slate-100in light mode → white-on-light, invisible. Now inherits in light,dark:text-white.Intentionally NOT changed
The three
bg-whitesurfaces inPreviewer/Device(the device viewport behind the<webview>) andDesignOverlay(the design-mockup backdrop) are the canvas, not chrome: the loaded website / uploaded design paints over them, so they must stay neutral in every theme. Darkening them would flash dark behind transparent or short pages. Left as-is by design.Verification (project toolchain)
prettier --check: all matchedeslinton the 6 files: clean (exit 0)tsc --noEmit: clean (exit 0, 0 errors)vitest run(full suite): 14 files / 69 tests passedNote on the commit
Committed with
--no-verify. The repo's husky pre-commit hook fails to spawncross-envin this monorepo checkout (the binary lives underdesktop-app/node_modules/.binwhile the hook runs from the repo root →ENOENTbefore it does any work). The checks the hook performs (prettier + eslint via lint-staged) were run and pass independently, as shown above, and CI lints via thelintscript rather than the hook.