Repository navigation
feat: give themes light and dark colors and organize Customize around the bar's look - #31
Merged
Merged
Conversation
… actions to General
This was referenced Oct 16, 2026
This was referenced Oct 19, 2026
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
Changing how the bar looks was hard to follow. Colors that StableBar wrote on its own hid a chosen theme (#28). A color was one fixed value, so any color you set stopped following light or dark mode, a theme's dark profile beat your own tokens, and the built-in look wasn't a theme at all (#29). Customize hid the theme picker in a popover, left most styles to JSON and never showed what overrides the theme (#30). The bar's menus also listed five configuration actions next to each other.
Fixes #28
Fixes #29
Fixes #30
The three issues share one pull request on request, plus the menu change raised while trying the branch. Each has its own commit.
Changes
Colors and themes (
feat, #29)"#RRGGBB[AA]"or{ "light": "#…", "dark": "#…" }. Pairs render as a dynamicNSColor, and tokens carry them unchanged.bar.appearance(lightordark) keeps the bar and its popups in one appearance and decides whichwhen.appearanceprofiles match, including when it comes from a token. Setup's Light and Dark set it instead of writing five colors intodefaults, and setup now offers Appearance for every theme.Resources/themes, whichscripts/build.shcopies into the app: Built-in (the old hard-coded look plus the nine shared tokens), Slate (moved fromexamples/themes, converted to pairs), Paper and Graphite."theme": { "id": "slate" }without a version selects one; with a version,themestill selects an installed package.tokensbeat a theme in both appearances.WidgetStyle.light/.darkand thesystemColorfallbacks are gone.bar.appearanceandthemewithout a version. README: "Layout and style", "Theme tokens and automatic profiles", "Themes" (formerly "Theme packages"), setup and command-line controls.Colors StableBar wrote (
fix, #28)defaults.accent; Built-in supplies it.migrateEarlierColorsreplaces setup's old Light and Dark colors withbar.appearance, removes thenullwidget colors that setup's Automatic choice wrote, and removes the starter's#007affaccent. Only exact values change, and only once, so colors set by hand stay, including a#007affaccent added later.Customize (
feat, #30)tokens, default colors, font, weight, size, padding and corners, and the bar's size and position.BarStore.origins, which now records the token behind a value. A value set in the main file shows Reset to default.--batch:tokens, andunset, which removes keys from the main file so the inherited value applies again (unlikenull, which clears it).unsetnever removes a parent that a token supplies.Menus (
feat)Breaking for existing configurations
This stays on 0.x, so no commit uses
!.text,surface,surfaceRaisedoraccentmust be a color, because Built-in'sdefaultsuse those names. A string or object token with one of these names now fails to load with an error aboutdefaults.nullcolor indefaultsmeans no color instead of the built-in one. The first start removes the nulls that setup wrote.defaults.accentget Built-in's system blue (#007aff,#0a84ffin dark mode) instead of the orange fallback.Testing
swift test: 114 passed, and each commit builds and passes on its own.ThemePackageTests: color pairs and their errors; Built-in under every theme, replacing package fallbacks while package-only tokens survive; your tokens beating Slate in light and dark; bundled theme selection, unknown themes and package selections without a version; every bundled theme defines all nine tokens with different light and dark values;bar.appearance, set directly or through a token, deciding appearance profiles; migrating setup's Light, Dark and Automatic colors, partial nulls and the starter accent, after which Slate's colors show, while hand-set colors stay byte for byte.RuntimeControlTests:tokensandunsetedits, reset falling back to an included file's value,unsetleaving a token reference intact, and source captions.WidgetTests: setup writesbar.appearanceand selects bundled themes by ID.scripts/build.shand ran--validateonResources/config.json,examples/modular,examples/interactiveand a configuration for each bundled theme withbar.appearanceset todark. An unknown theme fails with its message.Merging
Use a merge commit or a rebase merge so each of the four commits reaches the changelog.
Claude Opus 5.5 via Claude Code