docs(@projects/@magic-civilization): 📝 p2-87 font_color migration complete; StyleBox sweep next
font_color override→inheritance done (variations + 14 redundant deletes + 2 dynamic button carve-outs). Remaining loop work: misc colour keys (triage) + 27 inline StyleBoxes (migrate default-duplicates, carve out custom). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4daab42f72
commit
04e2dda443
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ 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. **Remaining:** ~7 font_color overrides on **Button** nodes (top_bar/overlay_panel/lens_switcher) — need a Button type-variation added to the pipeline (a Label variation breaks Button stylebox lookup); the redundant `text.primary`=default deletes; font-size overrides (176) + inline StyleBoxes (27) as separate sub-sweeps.
|
||||
- [~] **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).
|
||||
- [ ] **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