feat(controller): migrate Install/Deploy screen to semantic colour tokens (theming)#18
Merged
Merged
Conversation
… T0) Start the light-theme overhaul as a refactor-by-feature slice. The app already had a DayNight setup, but most screens hardcoded dark-tuned hex, so light mode breaks wherever that happens. Foundation (additive — nothing renamed or removed yet): - Add a semantic colour-token palette with full light/dark parity in values/colors.xml + values-night/colors.xml: surfaces (surface_background/ card/section), text (primary/secondary/disabled/on_accent), accent/accent_muted, status (success/warning/danger/info), divider_line, and data-viz (chart_*). QR colours (qr_foreground/qr_background) are intentionally fixed — no -night override — since a QR must stay black/white to scan. - Document the palette and the rule (no hardcoded colours; every token defined in both values and values-night) in CLAUDE.md (new "Theming" section). Pilot — Dashboard (the reference migration to copy): - fragment_dashboard.xml: replace the 7 hardcoded hex (#888888 -> @color/text_secondary; offline badge #555555 -> @color/surface_section). - DashboardFragment.java: replace the Color.parseColor gauge/battery colours with ContextCompat.getColor(R.color.status_warning/danger/success/info). Legacy dash_*/literal tokens are kept for now and retired as other screens migrate. Verify in light AND dark on device.
ResourceGaugeView hardcoded the gauge title (#CCCCCC) and subtitle (#AAAAAA) in a light grey that is unreadable on the light surface, and the track arc in #333333 (a heavy black arc on a light card). Route them through tokens: title/subtitle -> text_secondary, percent -> text_primary, track -> chart_track, default arc -> status_success. Removes the last hardcoded colours from the Dashboard's gauges; verify both modes.
The light-theme track (#E0E0E0) blended into the card background, so the gauge 'path' was barely distinguishable from the surface. Bump to #C4C7CC so the track reads clearly as the channel the colored arc follows. Dark theme track (#333333) is unchanged.
…kens Refactor-by-feature theming slice for the INSTALL tab (DeployFragment + fragment_deploy.xml + dialog_install_planner_settings.xml). Largest screen in the app and the heaviest colour-debt offender. Includes the shared round-2 token block (twins in values + values-night), adding over the Usage slice: surface_active_warning (orange info banner) and text_on_warning (fixed-dark text for amber buttons, where white is illegible). Migration (no behaviour/layout change intended): - fragment_deploy.xml: 35 hex -> tokens. Tier buttons #333333 -> btn_neutral (stays dark in both themes so white text reads); legend dots -> chart_os/maps/wiki + chart_track (free); error card #44FF0000 -> surface_active_danger; amber action #FFC107 -> status_pending with #000000 text -> text_on_warning; greens/reds/blues -> status_success/danger/info. - dialog_install_planner_settings.xml: 4 hex -> tokens. - DeployFragment.java: 39 refs. Color.parseColor(...)/Color.RED/Color.WHITE -> ContextCompat.getColor(R.color.*) (pattern already used in this file). LEDs -> status_pending/info/danger/success + accent_secondary (purple); gauge segments -> chart_*; chart grid #333333 -> divider_line; line-chart #4CAF50 -> accent. Color.TRANSPARENT kept (theme-independent). Review notes: checkbox tint (was Color.WHITE) -> text_primary so it adapts to the surface; single-series line chart -> accent. Verify in light AND dark.
Review feedback on the light theme: - Legend labels (IIAB / IIAB Maps / Wikipedia / Free) were 12sp regular and read too light; add textStyle=bold (colour unchanged). Orbitron value numbers untouched. - The status LED panel barely separated from the page in light mode (#E8EAED panel on #F4F5F7 page). Darken dash_module_bg #E8EAED -> #DEE1E6 (light only; dark twin unchanged) so the panel reads as a card. This token is shared, so the Usage LED panel gets the same treatment (they already use the identical token — confirmed).
…g PRs Make the round-2 token block byte-identical in the Usage/Install/Share theming branches (12 tokens incl. toggle_selected, plus dash_module_bg #DEE1E6) so colors.xml merges cleanly regardless of merge order. Tokens not referenced by this screen are harmless definitions (other screens use them).
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.
INSTALL tab theming (heaviest colour-debt screen). Files:
fragment_deploy.xml(35),dialog_install_planner_settings.xml(4),DeployFragment.java(39).Round-2 adds:
surface_active_warning,text_on_warning. Highlights: tier buttons#333333->btn_neutral; legend dots->chart_os/maps/wiki+chart_track; error card->surface_active_danger; amber->status_pending+text_on_warning; LEDs->status_*+accent_secondary; chart grid->divider_line; line-chart->accent. Review: checkbox tint->text_primary.Verified: XML valid, 0 hex left, tokens resolve, braces balanced. Verify light+dark on-device.