Skip to content

Commit be10fb6

Browse files
committed
Audit theme v2 CSS and enforce migration consolidation rules - PR_26152_029-theme-v2-gap-audit
1 parent 92706da commit be10fb6

2 files changed

Lines changed: 147 additions & 0 deletions

File tree

docs/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,26 @@ When a style is missing:
219219
4. Reuse everywhere.
220220
5. Do not implement locally.
221221

222+
### Theme V2 Consolidation Rule
223+
224+
During migration, allowed:
225+
- moving existing reusable CSS into `theme/v2` ownership files
226+
- renaming ownership locations
227+
- removing duplicates
228+
- normalizing existing patterns
229+
230+
During migration, not allowed:
231+
- creating new component designs
232+
- creating new visual patterns
233+
- creating new utility systems
234+
- creating new color systems
235+
- creating new layout systems
236+
237+
If a required pattern does not exist:
238+
1. Document it as a Design System Gap.
239+
2. Stop.
240+
3. Request approval before implementation.
241+
222242
Exception documentation is required for any approved deviation and must include:
223243
- File.
224244
- Reason.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Theme V2 Gap Audit - PR_26152_029-theme-v2-gap-audit
2+
3+
## Scope
4+
5+
- Audited every CSS file under `GameFoundryStudio/assets/css/theme/v2/`.
6+
- Documentation-only PR. No CSS, HTML, or JavaScript was changed.
7+
- Playwright impacted: No. This PR is docs/workflow only.
8+
- Compared current Theme V2 CSS with the prior CSS-foundation commit and searched existing GameFoundryStudio CSS sources for matching selectors and patterns.
9+
10+
## Audit Inputs
11+
12+
- Theme V2 files audited:
13+
- `GameFoundryStudio/assets/css/theme/v2/accordion.css`
14+
- `GameFoundryStudio/assets/css/theme/v2/buttons.css`
15+
- `GameFoundryStudio/assets/css/theme/v2/colors.css`
16+
- `GameFoundryStudio/assets/css/theme/v2/controls.css`
17+
- `GameFoundryStudio/assets/css/theme/v2/dialogs.css`
18+
- `GameFoundryStudio/assets/css/theme/v2/forms.css`
19+
- `GameFoundryStudio/assets/css/theme/v2/layout.css`
20+
- `GameFoundryStudio/assets/css/theme/v2/panels.css`
21+
- `GameFoundryStudio/assets/css/theme/v2/spacing.css`
22+
- `GameFoundryStudio/assets/css/theme/v2/status.css`
23+
- `GameFoundryStudio/assets/css/theme/v2/tables.css`
24+
- `GameFoundryStudio/assets/css/theme/v2/theme.css`
25+
- `GameFoundryStudio/assets/css/theme/v2/typography.css`
26+
- Legacy comparison sources inspected:
27+
- `GameFoundryStudio/assets/css/gamefoundrystudio.css`
28+
- `GameFoundryStudio/assets/css/colors.css`
29+
- `GameFoundryStudio/assets/css/controls.css`
30+
- `GameFoundryStudio/assets/css/pages.css`
31+
32+
## Required Pattern Classification
33+
34+
| Pattern | Current owner | Classification | Evidence | Audit finding |
35+
| --- | --- | --- | --- | --- |
36+
| Horizontal accordion toggle | `accordion.css` | Moved existing CSS, normalized | Existing selectors in `GameFoundryStudio/assets/css/gamefoundrystudio.css`: `.horizontal-accordion-toggle`, directional states, generated arrow, and tool-column variants. | Existing pattern, not a new component design. Keep future changes limited to migration/normalization unless separately approved. |
37+
| Tool display mode | `panels.css`, `accordion.css`, `layout.css` | Moved existing CSS, split by ownership | Existing selectors in `GameFoundryStudio/assets/css/gamefoundrystudio.css`: `.tool-display-mode`, summary arrow, badge/body/character/fullscreen/description, and focus-mode variants. | Existing pattern. The split across panel, accordion, and layout ownership is reasonable, but future expansion should be approval-gated because it behaves like a tool shell pattern. |
38+
| Tool columns | `panels.css`, `accordion.css`, `layout.css`, `spacing.css` | Moved existing CSS, consolidated duplicate shell rules | Existing selectors in `GameFoundryStudio/assets/css/gamefoundrystudio.css`: `.tool-workspace`, `.tool-column`, collapsed states, center panel, responsive rules, and focus-mode rules. | Existing tool shell layout. The audit treats this as migrated foundation, not permission to create new layout systems during migration. |
39+
| Tool column headers | `panels.css`, `colors.css`, `accordion.css` | Moved existing CSS, color concerns separated | Existing selectors in `GameFoundryStudio/assets/css/gamefoundrystudio.css` and `GameFoundryStudio/assets/css/colors.css`: `.tool-column-header`, heading colors, named color variants, group accent variables. | Existing pattern. Color-only variants belong in `colors.css`; structural header styling belongs in `panels.css`. |
40+
| Table styling | `tables.css` | Moved existing CSS and consolidated generic table baseline | Existing selectors in `GameFoundryStudio/assets/css/gamefoundrystudio.css`: `.table-wrapper`, `.table`, `.table th`, `.table td`; existing generic `table` styling in `GameFoundryStudio/assets/css/controls.css`. | Existing table pattern. No new table design found. |
41+
| Status styling | `status.css` | Moved existing CSS | Existing selectors in `GameFoundryStudio/assets/css/gamefoundrystudio.css`: `.status`, `.log`, `.pill`, `.role`, `.tool-card .role:last-child`, `.tool-group-label`, `.tool-group-swatch`. | Existing status/metadata pattern. `.tool-group-label` and `.tool-group-swatch` are listing metadata, not status messaging, and should be revisited during the tools index migration. |
42+
| Dialog styling | `dialogs.css` | Moved existing CSS, possible one-off retained | Existing generic `dialog` styling in `GameFoundryStudio/assets/css/controls.css`; `.dialog-sample` existed in `GameFoundryStudio/assets/css/pages.css`. | Generic `dialog` ownership is valid. `.dialog-sample` is sample/demo-specific and remains a possible one-off until a migrated page proves it is reusable. |
43+
| Brand color utilities | `colors.css` | Existing utility pattern moved from legacy colors | Existing selectors and variables in `GameFoundryStudio/assets/css/colors.css`: `meaning-*`, `brand-color-*`, `brand-background-*`, `side-*`, swatches, and tool group color variables. | Existing color utility surface. Future additions would be a new color system unless explicitly approved. |
44+
45+
## File-by-File Classification
46+
47+
| File | Moved existing CSS | Consolidated duplicate CSS | Newly created CSS | Possible one-off CSS | Ownership mismatches |
48+
| --- | --- | --- | --- | --- | --- |
49+
| `theme.css` | Import hub only. | Consolidates the approved Theme V2 import order. | None. | None. | None. |
50+
| `colors.css` | Brand tokens, meaning classes, swatches, side accents, tool-group colors, and tool-column color variants mirror legacy color surfaces. | Consolidates brand and tool-group color concerns that previously appeared in legacy color and page/tool CSS. | New token names exist only as ownership normalization for existing values. | `brand-background-*` and `meaning-*` are broad utilities and should not be expanded without approval. | Component-named selectors such as `.tool-column-header.*` are acceptable only because they define color state. |
51+
| `spacing.css` | Tool shell, dialog, card image, and focus dimensions were extracted from existing legacy values. | Consolidates hardcoded repeated sizes into tokens. | New token names were introduced, but they represent existing measures rather than new visuals. | Tool-shell tokens are coupled to the current tool layout and should not become a broader layout system without approval. | None. |
52+
| `typography.css` | Body, heading, paragraph, link, list, code, `kicker`, and `lede` styles match existing migrated typography concerns. | Consolidates base typography. | None identified in this audit. | None. | None. |
53+
| `layout.css` | Page containers, nav/footer layout, grids, admin stacks, tool workspace, tool grid, and focus-mode rules match existing legacy layout selectors. | Consolidates duplicated layout rules from legacy page and tool surfaces. | No new visual layout found for named patterns; focus-mode token names are normalization. | Tool focus mode is broad and should be approval-gated for future expansion. | Some tool-shell behavior sits in global layout ownership by necessity; future tool-specific variants should be treated as gaps. |
54+
| `buttons.css` | `.btn`, `.button-row`, `.inline-row`, and `.return-to-top` match existing legacy button/action patterns. | Consolidates button row and return-to-top behavior. | Hover/disabled states are normalized onto existing button classes. | None. | `.return-to-top` uses `--accordion-button-*` custom property names; rename during a future approved cleanup to avoid accordion-specific naming in button ownership. |
55+
| `forms.css` | `.field`, `.form-row`, `fieldset`, labels, inputs, selects, ranges, meter, and `.control-fieldset` match legacy form/control patterns. | Consolidates repeated form and control fieldset rules. | None identified. | None. | None. |
56+
| `controls.css` | Switch, slider, choice, control demo, and tool-group control accent rules match existing controls CSS. | Consolidates reusable control behavior. | None identified. | None. | None. |
57+
| `panels.css` | Cards, panels, mini stats, side menu, brand swatches, mascot/stage cards, tool cards, tool columns, tool display bodies, about/game/release panels match existing page and tool patterns. | Consolidates duplicate card and panel surfaces. | No new named visual component found for the required patterns. | `dialog-sample` is not here; panel-specific page sections such as release/about patterns should remain migration-bound until those families are in scope. | `brand-color-code` and `brand-color-swatch` are visual color samples in panel ownership; consider moving to color ownership only with approval. |
58+
| `accordion.css` | Native details/summary, vertical accordion, horizontal toggle, tool-column accordion spacing, group accent toggles, and tool display summary arrows match existing legacy selectors. | Consolidates vertical and horizontal accordion behaviors. | None identified for the required accordion pattern. | Tool display summary arrows are tightly coupled to one tool shell pattern. | Tool-display summary rules are split here because they are disclosure controls; document before expanding. |
59+
| `status.css` | `.status`, `.log`, `.pill`, `.role`, `.tool-group-label`, and `.tool-group-swatch` match existing legacy selectors. | Consolidates status/log/meta badge rules. | None identified. | `.tool-group-label` and `.tool-group-swatch` may belong to tools index metadata rather than status. | Potential ownership mismatch for tool-group label/swatch; revisit during tools index migration. |
60+
| `tables.css` | `.table-wrapper`, `table`, `.table`, captions, cells, and headers match existing table rules. | Consolidates generic table and `.table` class rules. | None identified. | None. | None. |
61+
| `dialogs.css` | Generic `dialog` and `.dialog-sample` styles match existing legacy controls/pages CSS. | Consolidates dialog baseline and demo sample styling. | None identified for generic dialog styling. | `.dialog-sample` is possible one-off/demo styling. | `.dialog-sample` may need a reusable name or removal when the owning page migrates. |
62+
63+
## Missing Approved Ownership Files
64+
65+
None. All approved Theme V2 ownership files exist:
66+
67+
- `theme.css`
68+
- `colors.css`
69+
- `controls.css`
70+
- `typography.css`
71+
- `spacing.css`
72+
- `buttons.css`
73+
- `forms.css`
74+
- `panels.css`
75+
- `accordion.css`
76+
- `status.css`
77+
- `tables.css`
78+
- `dialogs.css`
79+
- `layout.css`
80+
81+
`theme.css` imports every approved ownership file except itself.
82+
83+
## Newly Created CSS Classification
84+
85+
- No confirmed new visual component design was found among the specifically requested patterns.
86+
- New Theme V2 token names were introduced during consolidation to represent existing legacy values, especially in `spacing.css` and `colors.css`.
87+
- Broad utility surfaces such as `brand-background-*`, `meaning-*`, and tool-shell layout tokens already existed in legacy CSS, but the audit classifies future expansion of those surfaces as approval-gated under the new Theme V2 Consolidation Rule.
88+
89+
## Possible One-Off CSS
90+
91+
- `.dialog-sample` in `dialogs.css`: legacy sample/demo pattern; keep documented as a possible one-off until a migrated page proves reusable ownership.
92+
- `.brand-color-code` and `.brand-color-swatch` in `panels.css`: existing branding sample presentation; possible color-ownership candidate during the Branding/Admin migration.
93+
- Tool display mode and tool focus mode: existing tool shell pattern, but broad enough that new variants should be treated as design-system gaps until approved.
94+
95+
## Ownership Mismatches
96+
97+
- `buttons.css`: `.return-to-top` reuses `--accordion-button-*` custom property names. Behavior is button-owned; naming is accordion-specific.
98+
- `status.css`: `.tool-group-label` and `.tool-group-swatch` are tools-index metadata rather than status messaging.
99+
- `panels.css`: `brand-color-code` and `brand-color-swatch` may belong in `colors.css` if they become reusable color documentation utilities.
100+
- `dialogs.css`: `.dialog-sample` names a sample/demo use case rather than a reusable dialog primitive.
101+
102+
## Design-System Gaps
103+
104+
- Add an approved "tool shell" ownership decision before extending tool workspace, focus mode, tool columns, or tool display mode beyond migration of existing patterns.
105+
- Add an approved naming cleanup for button-like custom properties currently named `--accordion-button-*`.
106+
- Decide whether branding color samples belong to `colors.css` or remain panel presentation patterns.
107+
- Decide whether `.dialog-sample` should be renamed into a reusable dialog content pattern or left behind when its page migrates.
108+
- Do not add missing variants during migration. Document the gap, stop, and request approval first.
109+
110+
## Documentation Validation
111+
112+
Lanes executed:
113+
- contract documentation/static validation because this PR changes governance docs and produces an audit report only.
114+
115+
Lanes skipped:
116+
- runtime, integration, engine, samples, and recovery/UAT because no CSS, HTML, JavaScript, runtime, engine, sample, or UAT behavior changed.
117+
118+
Samples decision:
119+
- SKIP because this is documentation/report validation only.
120+
121+
Expected PASS behavior:
122+
- Theme V2 audit report exists at `docs/dev/reports/theme_v2_gap_audit.md`.
123+
- `docs/dev/PROJECT_INSTRUCTIONS.md` contains `### Theme V2 Consolidation Rule`.
124+
- `git diff --name-only` has no changed `.css`, `.html`, or `.js` files.
125+
126+
Expected WARN behavior:
127+
- Legacy CSS may still contain duplicated deprecated selectors because this PR is audit-only and does not remove CSS.

0 commit comments

Comments
 (0)