Repository navigation
feat(themes): add built-in Lens theme with contextual palette switcher - #66
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.
Why
Luker's built-in themes currently consist of lightweight color presets without a modern frosted-glass / low-glare reading theme or a built-in way to switch between dark, light, and flat low-GPU palettes without relying on third-party Quick Reply sets that clutter the input bar across unrelated themes.
Changes
Built-in
Lenstheme (default/content/themes/Lens.json&default/content/index.json):font-size: 15px, disabling mobile font inflation (-webkit-text-size-adjust: 100%; text-size-adjust: 100%), mounting a consistent system CJK/Latin sans-serif font stack (--lt-font), and exposing--lt-size/--lt-weight(400) in the adjustable header.backdrop-filter: noneand hide the background gradient pseudo-element (display: none) to avoid offscreen GPU readbacks; frosted palettes cap blur at16pxdesktop /8pxmobile (contain: strictstatic layer on#bg1::after); addedcontain: layout styleper.mesbubble and removed fullscreendialog::backdropblur.#chatedge borders.Contextual palette switcher (
public/scripts/lens-palette.js,public/css/lens-palette.css,public/scripts/power-user.js):Night/Mist/Ink/Paper/Auto) at the top of the bottom-left#options(•••) menu without widening the menu (~150px) and without adding any persistent button to the top bar or input bar.--lt-theme: 1; switching away to any other theme immediately hides the strip, removeshtml[data-lt-palette]/lt-theme-active, and restores<meta name="theme-color">.Automode trackingprefers-color-scheme, persists preference inlocalStorage, triggerssyncIosSystemBarsColor/syncAndroidSystemBarsColoron palette change, gently syncs same-origin adaptive card iframes, and guards#chatagainst stale legacy Quick Reply--lt-paletteinline writes.zh-CNandzh-TWtranslations inpublic/locales/zh-cn.jsonandpublic/locales/zh-tw.json.Tests (
tests/lens-palette.test.js):default/content/index.jsonregistration,Lens.jsonpalette/performance invariants, mode resolution (0–3&auto), contextual mounting/cleanup when switching themes, and legacy#chatinline style cleanup.Verification
node scripts/check-plugin-imports.js-> 0 violationsnpx eslint --quiet public/scripts/lens-palette.js public/scripts/power-user.js tests/lens-palette.test.js-> 0 errorsNODE_OPTIONS=--experimental-vm-modules npx jest tests/lens-palette.test.js-> 1 suite / 5 tests passed1280x800) and mobile (390x844) viewports in all 4 palettes plus theme-switching cleanup.