OXY-154: reusable color-theme helper (facade + pickers) - #296
Open
Kalin-Rudnicki wants to merge 2 commits into
Open
OXY-154: reusable color-theme helper (facade + pickers)#296Kalin-Rudnicki wants to merge 2 commits into
Kalin-Rudnicki wants to merge 2 commits into
Conversation
Unify Oxygen's two color-theme services behind one ergonomic surface: - service.ColorTheme: install (apply stored mode+pack, then subscribe both cross-tab), applyStored, subscribeCrossTab. Replaces the copy-pasted 4-line prePageLoad snippet; ColorMode/Theme manual forms still work. - component.ColorModePicker: drop-in Light/Dark/System segmented control, self-contained via a shared GlobalState, calls ColorMode.setAndPersist. - component.ThemePicker: drop-in OxygenThemes pack-card grid (swatch/name/ blurb/selected), packs filter, calls Theme.applyAndPersist. - a11y: role=radiogroup + role=radio/aria-checked. No new storage keys, pack defs, or CSS vars; reuses S.color.* tokens. Refactors: UIMain -> ColorTheme.install; electron Renderer -> applyStored; StylesPage/ThemePage/ShellPage/KitchenSinkPage -> pickers; ui docs updated to show the helper as preferred. See report/OXY-154.md for decisions + confidence. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Implements OXY-154 (epic OXY-133
oxygen-ui-rework): a single reusable surface for Oxygen's color theme, covering both bootstrap wiring and the duplicated picker UI.New
service.ColorTheme— unified facade overColorMode+Theme.install(apply stored mode+pack, then subscribe both cross-tab) replaces the copy-pasted 4-lineprePageLoadsnippet; alsoapplyStored/subscribeCrossTab. ManualColorMode/Themeforms still work (nothing removed).component.ColorModePicker— drop-in Light/Dark/System segmented control; self-contained via a sharedGlobalState; callsColorMode.setAndPersist.component.ThemePicker— drop-inOxygenThemespack-card grid (swatch + name + blurb + selected state),packsfilter; callsTheme.applyAndPersist.Constraints honored: no new storage keys / pack defs / CSS vars; reuses
S.color.*; a11y viarole=radiogroup+role=radio/aria-checked.Refactors:
UIMain->ColorTheme.install; electronRenderer->ColorTheme.applyStored;StylesPage/ThemePage/ShellPage/KitchenSinkPage-> the pickers;docs/ui/index.md+builders.mdshow the helper as preferred.Verification
Compiles clean under
-Werror -Wunused:all:oxygen-ui-web,example-ui-web,oxygen-ui-electron,example-ui-electron. Not run in a live browser; no Scala.js test suites executed (no tested logic changed).Notes
GlobalStateseeded fromlocalStorage; they don't subscribe toBroadcast, so cross-tab/programmatic changes don't re-highlight until re-render (theme application across tabs still works viaColorTheme.install).ThemePagedropped a few extras (live-token chips, apply toast, dynamic "Active:" label) when extracting intoThemePicker.Decisions, resolved open questions, and an honest confidence score (7.5/10) are in
report/OXY-154.md.🤖 Generated with Claude Code