Repository navigation
feat(app): redesign theme picker with swatches and live preview - #67752
Merged
Merged
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
1 task
1 task done
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.
opencode-theme-picker-pr-1080p60.mp4
Issue for this PR
No linked issue (internal UI improvement).
Type of change
What does this PR do?
Replaces the plain theme
Selectin Settings → Appearance with a searchableThemePickerthat renders a proportional 5-band color swatch next to each theme name (both on the inline trigger and inside the dropdown) and live-previews themes before committing.resolveThemeSwatchand precomputedBUNDLED_THEME_SWATCHESinpackages/ui/src/theme/swatch.tsso all 47 bundled theme swatches paint synchronously without loading every theme JSON up front.packages/app/src/settings/appearance/theme-picker-machine.ts) and KobaltePopover+MenuScrollpicker (theme-picker.tsx) keeping the existing flat alphabetical theme order, with instant keyboard live preview, debounced pointer preview (180mswarmup /35mssettle),Enter/click commit, andEscape/close revert.applyThemeCss(packages/ui/src/theme/context.tsx) by temporarily suppressing CSS transitions for one paint frame when the theme or color scheme changes so tinted chrome (active Settings nav pill, font inputs, buttons) snaps cleanly with the rest of the page.No feature flag — direct update to the existing Settings → Appearance theme selector.
How did you verify your code works?
bun run lint:changed(0 problems in 10 changed files)bun test(696 pass) andbun run typecheck:tscinpackages/uibun run test:unit(2,993 pass),bun run typecheck:tsc, andbun run buildinpackages/appScreenshots / recordings
Recorded locally against the real app (2× DPI); can attach the walkthrough clip on request.
Checklist