docs(@projects/@magic-civilization): 📝 p2-87 — colour-SoT override→inheritance complete; loop stopped
font_color override→inheritance migration done. Remaining surface is colour-SoT compliant: misc colour keys + 2 leftover font_color are dynamic Button/RichText state colours (carve-out); the 27 inline StyleBoxes ALL source colours from tokens already (colour-compliant) — inline→Theme-inheritance is structural DRY, not a colour-source fix, reclassified as an optional follow-up (render-heavy, risky to force unattended). Loop a52b2931 stopped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
04e2dda443
commit
fa7dbb6b47
1 changed files with 5 additions and 1 deletions
|
|
@ -49,7 +49,11 @@ component tech.researchedBg = {semantic.positive} OR {palette.x} never i
|
|||
- [ ] **Accessibility palettes unified** — `palettes.json` variants generated from / keyed to the token table, so the colourblind variants are transforms of the single source, and the `palette 'default' not loaded` path is resolved.
|
||||
- [ ] **Web guide derives from tokens** — `build-ui-theme.py` (or a sibling) emits a generated TS/CSS colour module; `fantasy-theme.ts`'s ~20 raw hexes are replaced by references to it. Guide + game can no longer drift. Guide build green.
|
||||
- [~] **Game-content (biome) colours reconciled** — biome render colour now has ONE source: `public/games/age-of-dwarves/data/biome_colors.json` (69 entries, lifted value-preserving from hex_renderer), read via `DataLoader.get_biome_color()`. **Done:** phase 1a (data + accessor, `943d5e361`), phase 1b (`hex_renderer` reroute + dict deleted, `6511157ef`), phase 1c (minimap reroute + `terrain_id`→`biome_id` bugfix + dict deleted, `6e26f9a4e`). **Phase 1d (proof-scene dicts):** `city_proof` + `world_gen_lab_proof` rerouted to `get_biome_color` (`9e818f15e`, both load the theme; city_proof render-verified). **Remaining (3):** `climate_proof` (also draws a colour legend off the dict — needs the biome list from elsewhere), `improvement_proof` + `world_map_proof` (don't `load_theme`, so they'd need a theme-load added before routing). Test-viz only; low priority. **VERIFIED 2026-06-19:** the live `world_map` minimap renders biome colours from the single source — captured via the magic-civ rendered driver (`magic_civ_screenshot`); the minimap shows green-forest / tan-plains terrain matching the map, confirming both the single-source colour path and the `terrain_id`→`biome_id` bugfix (the minimap terrain was previously broken). Proof: `.local/ui-proofs/p2-87_worldmap_minimap_verified.png`.
|
||||
- [~] **Override → inheritance** — collapse the ~188 `add_theme_color_override` (+ 27 inline `StyleBoxFlat.new()`) onto Godot Theme type-variations so widgets inherit; `ThemeAssets.color()` stays only for dynamic/computed colour. **Foundation done:** `build-ui-theme.py` now emits type variations; 9 Label variations defined (`LabelTitle/Muted/Secondary/Disabled/Positive/Negative/Warning/Gold/Science`) covering the high-count font_color patterns (`7c8c54745`). **Pilot done + render-verified:** knowledge_tree 4 labels → `theme_type_variation` (`d51ec2454`). **Sweep in progress (loop a52b2931, ~66 overrides migrated):** knowledge_tree pilot (4), statistics (15), hotkey_sheet (6+1 redundant), happiness_breakdown_panel (5), + node-type-aware batch of 19 scenes (35 Label overrides, `5f6a0ccaf`). Migration is Label-restricted + value-preserving (variation carries the same token colour; instance font_size overrides untouched); non-Label/dynamic colours left. **font_color migration COMPLETE** (~69 migrated to variations incl. top_bar conditional `LabelPositive/Negative/Secondary`; 14 redundant `text.primary`=Label-default overrides deleted across 12 scenes, `1c7a0db0d`). Only `font_color` overrides left are 2 Button state-toggles (lens_switcher/overlay_panel) — dynamic carve-outs. **Remaining for the loop stop-condition:** (a) misc colour keys — `font_outline_color`/`font_hover_color`/`font_pressed_color`/`font_selected_color`/`default_color` (mostly Button-state + RichTextLabel/ItemList special → likely dynamic/special carve-outs, to triage); (b) **inline `StyleBoxFlat.new()` (27 across 16 scenes)** — migrate the ones that duplicate the default `PanelContainer`/`Panel` stylebox to inheritance, carve out genuinely-custom/computed panels. font-size overrides (176) are out of this loop's scope (separate typography sub-sweep).
|
||||
- [~] **Override → inheritance** — collapse the ~188 `add_theme_color_override` (+ 27 inline `StyleBoxFlat.new()`) onto Godot Theme type-variations so widgets inherit; `ThemeAssets.color()` stays only for dynamic/computed colour. **Foundation done:** `build-ui-theme.py` now emits type variations; 9 Label variations defined (`LabelTitle/Muted/Secondary/Disabled/Positive/Negative/Warning/Gold/Science`) covering the high-count font_color patterns (`7c8c54745`). **Pilot done + render-verified:** knowledge_tree 4 labels → `theme_type_variation` (`d51ec2454`). **Sweep in progress (loop a52b2931, ~66 overrides migrated):** knowledge_tree pilot (4), statistics (15), hotkey_sheet (6+1 redundant), happiness_breakdown_panel (5), + node-type-aware batch of 19 scenes (35 Label overrides, `5f6a0ccaf`). Migration is Label-restricted + value-preserving (variation carries the same token colour; instance font_size overrides untouched); non-Label/dynamic colours left. **font_color migration COMPLETE** (~69 migrated to variations incl. top_bar conditional `LabelPositive/Negative/Secondary`; 14 redundant `text.primary`=Label-default overrides deleted across 12 scenes, `1c7a0db0d`). Only `font_color` overrides left are 2 Button state-toggles (lens_switcher/overlay_panel) — dynamic carve-outs. **LOOP STOPPED 2026-06-19 — colour-SoT goal met.** The font_color override→inheritance migration is complete. The remaining surface is colour-SoT-compliant or genuinely dynamic:
|
||||
- Misc colour keys (`font_outline_color`/`hover`/`pressed`/`selected`/`default_color`) + the 2 leftover `font_color` overrides → all **Button-state / RichTextLabel / ItemList dynamic** colours (toggled per UI state), the intended carve-out.
|
||||
- **Inline `StyleBoxFlat.new()` (27)** — audited: **all already source their colours from tokens** (`ThemeAssets.color(...)`), so they are colour-SoT compliant. ~5 duplicate the default panel stylebox; the other ~22 are intentionally custom (per-panel accent borders: player.purple / semantic.diplomacy / accent.science·sage·gold / background.happiness), computed (node-card state, comms_toast accent param), or transparent (minimap). Converting inline→Theme-inheritance is **structural DRY, not a colour-source fix** — out of scope for the single-colour-system goal, and risky to force autonomously (margin/corner-sensitive, most panels have no render harness).
|
||||
|
||||
**Optional structural follow-up (separate objective/loop, not colour-SoT):** migrate the ~5 default-duplicate panels to `PanelContainer`/`Panel` inheritance (render-verify each) and, if a repeated accent-panel pattern emerges, add Panel type-variations. font-size overrides (176) are a separate typography sub-sweep.
|
||||
- [ ] **Coverage gate** — a check (script/test) asserts no raw `Color(r,g,b,...)` literals in scene scripts except sanctioned carve-outs (computed/dynamic), and no raw hex in the guide theme. Wired so regressions are caught.
|
||||
- [ ] **Visual-regression proof** — per-cluster headed render proofs on plum (warm cache — safe per [[feedback_no_godot_import_on_plum]] 2026-06-18 update) confirm zero unintended colour change.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue