Skip to content

Commit 172b224

Browse files
author
DavidQ
committed
Validate Template V2 CSS consistency for tool/workspace launch modes and NAV variants - PR_26126_081-template-launch-mode-css-validation
1 parent f165dfb commit 172b224

2 files changed

Lines changed: 200 additions & 0 deletions

File tree

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
PR_26126_080 CSS-Only Template Consistency Audit
2+
3+
PR_26126_081 extension:
4+
- Added launch-mode NAV variant validation for default tool mode and `?launch=workspace` mode.
5+
6+
Scope:
7+
- Compared CSS only.
8+
- Template V2 was treated as the canonical CSS reference.
9+
- No CSS, HTML, JavaScript, samples, schemas, or roadmap files were modified.
10+
11+
CSS files audited:
12+
- tools/templates-v2/styles/toolStarter.css
13+
- tools/palette-manager-v2/paletteManagerV2.css
14+
- tools/preview-generator-v2/previewGeneratorV2.css
15+
16+
Method:
17+
- Parsed CSS declaration blocks and normalized declarations inside braces.
18+
- Compared declaration blocks, not selector names only.
19+
- Counted exact declaration matches and near matches by shared declaration properties and equal values.
20+
- Reviewed required style areas manually against the declaration-block findings.
21+
22+
Declaration-block scan summary:
23+
- tools/templates-v2/styles/toolStarter.css: 53 declaration blocks.
24+
- tools/palette-manager-v2/paletteManagerV2.css: 117 declaration blocks.
25+
- tools/preview-generator-v2/previewGeneratorV2.css: 39 declaration blocks.
26+
- Palette Manager V2 exact matches to Template V2: 7 declaration blocks.
27+
- Preview Generator V2 exact matches to Template V2: 4 declaration blocks.
28+
29+
Exact matches found:
30+
- Template `*` matches Palette Manager V2 universal box-sizing block.
31+
- Template `button:disabled` matches Palette Manager V2 disabled button block.
32+
- Template `input:hover, select:hover, textarea:hover` matches Palette Manager V2 input hover block.
33+
- Template `.tool-starter__field-patterns` matches Palette Manager V2 `.palette-manager-v2__tag-entry`.
34+
- Template `.tool-starter__menu[hidden]` and `.accordion-v2__content[hidden]` match Preview Generator V2 hidden content blocks.
35+
- Template `.tool-starter__status-header-actions` matches Preview Generator V2 `.preview-generator-v2__status-header-actions`.
36+
37+
Near common candidates found:
38+
- Template `.tool-starter__menu` and Palette Manager V2 `.palette-manager-v2__menu-sample`: 10 of 12 compared declarations match.
39+
- Template header summary block and Palette Manager V2 `.tools-platform-frame__accordion-summary`: 6 of 7 compared declarations match.
40+
- Template panel block and Palette Manager V2 panel block: 5 of 7 compared declarations match.
41+
- Template output/status block and Palette Manager V2 JSON preview block: 4 of 8 compared declarations match.
42+
- Template status header actions and Palette Manager V2 user/source/validation action blocks: 3 of 4 compared declarations match.
43+
- Template status header actions and Preview Generator V2 status header actions: exact declaration match.
44+
45+
Style area audit:
46+
47+
HEADER
48+
- Status: MATCH with DRIFT notes.
49+
- Template V2 uses the same V2 header shell family: shared theme CSS, `#shared-theme-header`, local frame, purple summary band, white title, muted eyebrow/meta/description.
50+
- Palette Manager V2 has near-identical declaration blocks for the frame and summary, with smaller summary padding.
51+
- Preview Generator V2 relies on Palette Manager/common shell styles rather than duplicating the full header block in its local CSS.
52+
- CANDIDATE FOR common/: shared local-shell frame, header content, summary, title, eyebrow/meta/description blocks.
53+
54+
NAV
55+
- Status: MATCH.
56+
- Template `.tool-starter__menu` and Palette Manager `.palette-manager-v2__menu-sample` are near-identical declaration blocks.
57+
- Preview Generator V2 uses the Palette Manager menu class from imported CSS.
58+
- CANDIDATE FOR common/: centered tool action menu block and action button group spacing.
59+
60+
LAUNCH MODE NAV VARIANTS
61+
- Status: MATCH.
62+
- Template V2 defines two NAV bars with the same canonical `.tool-starter__menu` declaration block:
63+
- tool mode NAV: `.tool-starter__tool__menu`
64+
- workspace mode NAV: `.tool-starter__workspace__menu`
65+
- Default tool mode validation:
66+
- tool NAV visible: display `flex`, centered, wrapping enabled, 12px gap, 1px border, 8px radius, dark panel background, 10px/14px padding.
67+
- workspace NAV hidden through the `hidden` attribute and `.tool-starter__menu[hidden] { display: none; }`.
68+
- `?launch=workspace` validation:
69+
- workspace NAV visible with the same computed container styles as tool NAV.
70+
- tool NAV hidden through the `hidden` attribute and the same hidden declaration block.
71+
- Tool NAV buttons and workspace NAV buttons use the same computed button style: 10px radius, 2px/6px padding, 1px border, matching ButtonFace/ButtonText rendering.
72+
- Hover/focus state source is shared because both NAV variants use the same global button/input focus-visible and button rules.
73+
- CANDIDATE FOR common/: launch-mode NAV visibility rule, shared tool/workspace NAV container, and shared NAV button pattern.
74+
75+
PANELS
76+
- Status: MATCH with DRIFT notes.
77+
- Template V2 and Palette Manager V2 both use three-column left/center/right panel roles, 340px/flexible/360px proportions, 14px gaps, 8px panel radius, 14px padding, and dark panel surfaces.
78+
- Template combines app shell and grid in `.tool-starter.app-shell`; Palette Manager separates wrapper/layout/panel concerns.
79+
- Preview Generator V2 uses Palette Manager panel classes plus local sizing overrides.
80+
- CANDIDATE FOR common/: base three-column grid, panel border/background/padding, and responsive panel layout.
81+
82+
ACCORDIONS
83+
- Status: MATCH with DRIFT notes.
84+
- Template V2 and both tools use accordion-v2 structure and hidden-content behavior.
85+
- Template owns a complete local accordion skin; Palette Manager mostly sets accordion variables under panels; Preview Generator V2 has additional local status and paths sizing blocks.
86+
- CANDIDATE FOR common/: accordion variable binding, header action row, status accordion header/action layout, hidden content handling.
87+
88+
BUTTONS
89+
- Status: MATCH with DRIFT notes.
90+
- Template and Palette Manager match disabled button declarations exactly.
91+
- Focus-visible and general radius/border behavior are aligned through equivalent variable patterns.
92+
- Template uses `ButtonFace`/`ButtonText`; Palette Manager/Preview Generator inherit a mix of platform and tool-specific button rules.
93+
- CANDIDATE FOR common/: base button, disabled button, focus-visible, header-action button, and menu button patterns.
94+
95+
LABELS
96+
- Status: MATCH.
97+
- Template field layout matches the Palette Manager compact field model: label column plus flexible input column, bold labels, 8px gap.
98+
- Palette Manager base `.palette-manager-v2__field` uses gap-only base plus compact modifier; Template uses the compact grid as base and a wider compact modifier for demo labels.
99+
- CANDIDATE FOR common/: compact field row pattern and source/control label rows.
100+
101+
EDITABLE INPUTS
102+
- Status: MATCH with DRIFT notes.
103+
- Template V2 editable demo uses `tool-starter__editable-tags-box`, matching the Palette Manager Tags `No tags.` visual intent: taller rounded field, dark strong surface, 36px minimum height, editable value.
104+
- Palette Manager Tags is a `div` tag list while Template uses an editable `input`, so declarations cannot be exact.
105+
- CANDIDATE FOR common/: editable tag/text box visual token set: min-height 36px, 8px radius, strong surface, 6px padding.
106+
107+
NON-EDITABLE DISPLAY FIELDS
108+
- Status: MATCH.
109+
- Template V2 non-editable demo uses readonly input styling aligned with Palette Manager Selected Swatch rows: muted text and default cursor.
110+
- Template adds reduced vertical padding to better match the slim readonly Symbol/Hex/Name/Source rows.
111+
- CANDIDATE FOR common/: readonly display input modifier.
112+
113+
TEXTAREAS
114+
- Status: DRIFT.
115+
- Template status textarea shares block styling with output pre blocks.
116+
- Preview Generator V2 uses `#log` as a div-like log block and `#sampleList` as a full-height monospace textarea.
117+
- Palette Manager JSON preview is a `pre` block with similar dark surface, border, radius, padding, and wrapping.
118+
- CANDIDATE FOR common/: log/output text block, JSON/pre output block, and full-height text input/textarea rules.
119+
120+
STATUS/LOG BLOCKS
121+
- Status: MATCH with DRIFT notes.
122+
- Template Status Clear placement/action row matches Preview Generator V2 declaration block exactly for header actions.
123+
- Template status log uses a readonly textarea; Preview Generator V2 uses `#log`; Palette Manager uses status text plus error list.
124+
- CANDIDATE FOR common/: status header row with Clear action, status/log content block, and compact validation/status stack.
125+
126+
OUTPUT/SUMMARY BLOCKS
127+
- Status: DRIFT.
128+
- Template Output Summary uses a pre block styled together with Status log.
129+
- Palette Manager Palette JSON preview uses a similar pre/output block with additional height/overflow constraints.
130+
- Preview Generator V2 Output Summary uses summary value rows, not a pre block.
131+
- CANDIDATE FOR common/: output pre block and summary value field block should be separate common patterns.
132+
133+
Overall findings:
134+
- MATCH: Template V2 is visually aligned with the current V2 tool surface for header family, nav, panel roles, accordion behavior, compact labels, readonly display fields, editable tag-style field, and Status Clear placement.
135+
- MATCH: Template V2 launch-mode NAV variants use the same canonical CSS declaration blocks and correctly hide/show one NAV at a time.
136+
- DRIFT: Textarea/log/output summary implementations differ by tool purpose and should not be merged blindly.
137+
- CANDIDATE FOR common/: Header shell, nav menu, launch-mode NAV visibility, panel grid, compact field rows, readonly display fields, editable tag-style box, status header actions, and output/log block primitives are good candidates for future common CSS extraction.
138+
139+
Validation:
140+
- Audit report exists.
141+
- No CSS changes were applied.
142+
- No runtime files were changed.
143+
- Playwright impacted: No.
144+
- No Playwright impact. This PR is docs/report only.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
PR_26126_081 Template Launch Mode CSS Validation
2+
3+
Scope:
4+
- Extended Template V2 CSS audit coverage for launch modes and NAV variants.
5+
- Compared CSS patterns for Template V2 tool NAV and workspace NAV.
6+
- No CSS, HTML, JavaScript, samples, schemas, or roadmap files were modified.
7+
8+
Launch modes validated:
9+
- Default tool mode: `tools/templates-v2/index.html`
10+
- Workspace mode: `tools/templates-v2/index.html?launch=workspace`
11+
12+
NAV variants validated:
13+
- Tool NAV: `.tool-starter__tool__menu`
14+
- Workspace NAV: `.tool-starter__workspace__menu`
15+
16+
Computed CSS validation:
17+
- Default tool mode:
18+
- Tool NAV visible: MATCH.
19+
- Workspace NAV hidden: MATCH.
20+
- Tool NAV container display: `flex`.
21+
- Tool NAV alignment: centered with `justify-content: center` and `align-items: center`.
22+
- Tool NAV spacing: `gap: 12px`, wrapping enabled.
23+
- Tool NAV border/background: 1px border, 8px radius, dark panel background.
24+
- Workspace mode:
25+
- Workspace NAV visible: MATCH.
26+
- Tool NAV hidden: MATCH.
27+
- Workspace NAV container display: `flex`.
28+
- Workspace NAV alignment, spacing, border, radius, background, and padding match tool NAV.
29+
- Hidden-state handling:
30+
- Hidden NAV uses the `hidden` attribute and `.tool-starter__menu[hidden] { display: none; }`.
31+
- Only one NAV is visible at a time in both modes.
32+
- NAV buttons:
33+
- Tool and workspace buttons share the same base button declarations.
34+
- Computed radius, padding, border, background, and text color match between tool and workspace NAV buttons.
35+
- Hover/focus states:
36+
- Both NAV variants use the same global button/focus-visible rules, so hover/focus source declarations match.
37+
38+
Audit findings:
39+
- MATCH: Tool mode defaults correctly and shows only tool NAV.
40+
- MATCH: Workspace mode shows only workspace NAV.
41+
- MATCH: Tool NAV and workspace NAV use the same canonical Template V2 NAV container style.
42+
- MATCH: Tool NAV and workspace NAV buttons use the same canonical Template V2 button style.
43+
- DRIFT: None found for launch-mode NAV CSS.
44+
- CANDIDATE FOR common/: shared launch-mode NAV container, shared NAV visibility rule, and shared NAV button/focus pattern.
45+
46+
Validation:
47+
- npx playwright test --config tools/templates-v2/playwright.config.mjs passed, 10 tests.
48+
- Computed-style launch-mode validation passed for default tool mode and workspace mode.
49+
- No CSS changes were applied.
50+
- No runtime files were changed.
51+
- Playwright impacted: No.
52+
- No Playwright impact. This PR is audit/report only.
53+
54+
Manual test notes:
55+
- Open tools/templates-v2/index.html and confirm only the tool NAV is visible.
56+
- Open tools/templates-v2/index.html?launch=workspace and confirm only the workspace NAV is visible.

0 commit comments

Comments
 (0)