Skip to content

feat(controller): semantic colour tokens + migrate Dashboard (theming…#14

Merged
luisguzman-adfa merged 3 commits into
mainfrom
feat/theming-tokens-dashboard
Jun 18, 2026
Merged

feat(controller): semantic colour tokens + migrate Dashboard (theming…#14
luisguzman-adfa merged 3 commits into
mainfrom
feat/theming-tokens-dashboard

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

… 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.

… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant