Skip to content

Commit 2afdad9

Browse files
committed
Polish Palette swatches and promote fullscreen Tool Center accordion behavior - PR_26156_175-palette-swatch-harmony-and-tool-center-flex
1 parent f57513c commit 2afdad9

11 files changed

Lines changed: 330 additions & 55 deletions

assets/theme-v2/css/accordion.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,25 @@ body.tool-focus-mode .accordion-scroll-body>.scroll-region {
180180
min-height: var(--space-0);
181181
overflow: auto
182182
}
183+
184+
body.tool-focus-mode .tool-center-panel>details.vertical-accordion {
185+
flex: 0 0 auto;
186+
min-height: var(--space-0)
187+
}
188+
189+
body.tool-focus-mode .tool-center-panel>details.vertical-accordion[open] {
190+
flex: 1 1 var(--space-0);
191+
min-height: var(--space-0);
192+
position: relative
193+
}
194+
195+
body.tool-focus-mode .tool-center-panel>details.vertical-accordion[open]>summary {
196+
min-block-size: var(--space-52);
197+
min-height: var(--space-0)
198+
}
199+
200+
body.tool-focus-mode .tool-center-panel>details.vertical-accordion[open]>.accordion-body {
201+
position: absolute;
202+
inset: var(--space-52) var(--space-0) var(--space-0);
203+
overflow: auto
204+
}

assets/theme-v2/css/layout.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ body.tool-focus-mode .tool-center-panel {
232232
overflow: auto
233233
}
234234

235-
body.tool-focus-mode .tool-center-panel--scroll-contained {
235+
body.tool-focus-mode .tool-center-panel:has(>.accordion-fill-stack),
236+
body.tool-focus-mode .tool-center-panel:has(>details.vertical-accordion) {
236237
display: flex;
237238
flex-direction: column;
238239
height: 100%;

assets/theme-v2/css/panels.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,17 @@
235235
max-width: var(--tool-center-copy-max)
236236
}
237237

238+
body.tool-focus-mode .tool-center-panel:has(>details.vertical-accordion)>img {
239+
width: auto;
240+
max-width: min(var(--tool-center-image-max), 75%);
241+
max-height: var(--space-78);
242+
margin: var(--space-0) auto var(--space-10)
243+
}
244+
245+
body.tool-focus-mode .tool-center-panel:has(>details.vertical-accordion)>p {
246+
margin-block: var(--space-0) var(--space-10)
247+
}
248+
238249
.tool-display-mode {
239250
margin: var(--space-0) var(--space-0) var(--space-12);
240251
position: relative;
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# PR_26156_175 Palette Swatch Harmony and Tool Center Flex Report
2+
3+
## Result
4+
PASS
5+
6+
## Summary
7+
- Promoted fullscreen Tool Center accordion height behavior beyond Palette-only markup.
8+
- Removed Palette Colors selected-summary symbols so the visible summary reads as the swatch name plus the existing `Selected` label.
9+
- Stopped pinned/copied source and harmony colors from inheriting source metadata tags into user Palette Colors.
10+
- Removed Harmony `Add Selected` and made harmony swatches use the same red/green pin behavior as other swatches.
11+
12+
## Theme V2 Gap
13+
PR_26156_174 added reusable fill classes but Palette still opted into the center fullscreen containment directly. Theme V2 did not yet have a reusable Tool Center fullscreen pattern that automatically contains center accordion stacks, supports direct center accordions, and keeps accordion body scrolling separate from headers.
14+
15+
Reusable Theme V2 behavior was added in:
16+
- `layout.css`: Tool Center panels with an accordion fill stack or direct center accordions become scroll-contained only in fullscreen.
17+
- `accordion.css`: Direct Tool Center accordions flex-share fullscreen space and scroll only their accordion body.
18+
- `panels.css`: Direct-accordion Tool Center intro media/copy compacts only in fullscreen so the accordion stack has usable vertical space.
19+
20+
## Palette Behavior
21+
- Selected summary now shows only the selected swatch name, for example `Black` in the value cell beside the `Selected` label.
22+
- Source swatch tags remain visible as source metadata, but pinned source colors enter Palette Colors with empty user tags.
23+
- Harmony-generated colors enter Palette Colors with empty user tags.
24+
- Harmony swatches show the same pin dot as source and Palette Colors swatches.
25+
- Clicking an unpinned harmony swatch adds it to Palette Colors and turns the dot green.
26+
- Clicking a pinned harmony swatch removes that color from Palette Colors and returns the dot to red.
27+
- Harmony Add All still adds remaining unpinned harmony colors and skips duplicates.
28+
29+
## Validation
30+
- `node --check toolbox/colors/colors.js`
31+
- PASS
32+
- `node --check toolbox/colors/palette-workspace-repository.js`
33+
- PASS
34+
- `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
35+
- PASS
36+
- `node --check tests/playwright/tools/ToolCenterFullscreenAccordion.spec.mjs`
37+
- PASS
38+
- `rg "style=|<style|onclick|onchange|oninput|onsubmit" toolbox/colors/index.html toolbox/colors/colors.js toolbox/colors/palette-workspace-repository.js assets/theme-v2/css/layout.css assets/theme-v2/css/accordion.css assets/theme-v2/css/panels.css tests/playwright/tools/PaletteToolMockRepository.spec.mjs tests/playwright/tools/ToolCenterFullscreenAccordion.spec.mjs`
39+
- PASS, no matches
40+
- `npx playwright test tests/playwright/tools/ToolCenterFullscreenAccordion.spec.mjs --project=playwright --workers=1 --reporter=list`
41+
- PASS, 1 test
42+
- `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list`
43+
- PASS, 3 tests
44+
- `npm run test:playwright:static`
45+
- PASS
46+
47+
## Verification Coverage
48+
- Fullscreen Palette accordions still share available center height and keep controls visible.
49+
- Fullscreen Publish Tool Center direct accordions share available height and expand when the other accordion collapses.
50+
- Only accordion body/swatch content scrolls in the tested fullscreen accordion layouts.
51+
- Palette selected summary omits the swatch symbol.
52+
- Source-pinned user Palette Colors do not inherit source tags.
53+
- Harmony-pinned user Palette Colors do not inherit harmony/source tags.
54+
- Harmony swatches use red/green pinned state and click-to-add/click-to-remove behavior.
55+
- Harmony Add All skips duplicates.
56+
57+
## Notes
58+
- A broader exploratory run of `tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs` exposed existing identity-row copy expectation drift unrelated to this PR. The focused shared Tool Center fullscreen spec was added and passed as the targeted validation lane.
59+
60+
## Skipped
61+
- Full samples smoke was not run, per BUILD instruction.

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@ Exercised tool entry points detected:
1717
(83%) Theme V2 Shared JS - exercised 2 runtime JS files
1818

1919
Changed runtime JS files covered:
20-
(87%) toolbox/colors/palette-workspace-repository.js - executed lines 1118/1118; executed functions 110/127
20+
(87%) toolbox/colors/palette-workspace-repository.js - executed lines 1150/1150; executed functions 111/128
21+
(95%) toolbox/colors/colors.js - executed lines 734/734; executed functions 73/77
2122

2223
Files with executed line/function counts where available:
2324
(65%) toolbox/project-workspace/project-workspace-mock-repository.js - executed lines 402/402; executed functions 20/31
2425
(75%) toolbox/toolRegistry.js - executed lines 1754/1754; executed functions 27/36
2526
(80%) assets/theme-v2/js/gamefoundry-partials.js - executed lines 205/205; executed functions 16/20
2627
(87%) assets/theme-v2/js/tool-display-mode.js - executed lines 201/201; executed functions 13/15
27-
(87%) toolbox/colors/palette-workspace-repository.js - executed lines 1118/1118; executed functions 110/127
28-
(95%) toolbox/colors/colors.js - executed lines 745/745; executed functions 74/78
28+
(87%) toolbox/colors/palette-workspace-repository.js - executed lines 1150/1150; executed functions 111/128
29+
(95%) toolbox/colors/colors.js - executed lines 734/734; executed functions 73/77
2930
(100%) toolbox/colors/palette-source-mock-db.js - executed lines 927/927; executed functions 6/6
3031

3132
Uncovered or low-coverage changed JS files:
3233
(100%) none - no low-coverage changed runtime JS files
3334

3435
Changed JS files considered:
3536
(0%) tests/playwright/tools/PaletteToolMockRepository.spec.mjs - changed JS file not collected as browser runtime coverage
37+
(0%) tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs - changed JS file not collected as browser runtime coverage
3638
(87%) toolbox/colors/palette-workspace-repository.js - changed JS file with browser V8 coverage
39+
(95%) toolbox/colors/colors.js - changed JS file with browser V8 coverage
Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
# PR_26156_174 Testing Lane Execution Report
1+
# PR_26156_175 Testing Lane Execution Report
22

33
## Result
44
PASS
55

66
## Commands Run
7+
- `node --check toolbox/colors/colors.js`
8+
- PASS
9+
- `node --check toolbox/colors/palette-workspace-repository.js`
10+
- PASS
711
- `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
812
- PASS
9-
- `rg "style=|<style|onclick|onchange|oninput|onsubmit" toolbox/colors/index.html assets/theme-v2/css/accordion.css assets/theme-v2/css/layout.css tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
13+
- `node --check tests/playwright/tools/ToolCenterFullscreenAccordion.spec.mjs`
14+
- PASS
15+
- `rg "style=|<style|onclick|onchange|oninput|onsubmit" toolbox/colors/index.html toolbox/colors/colors.js toolbox/colors/palette-workspace-repository.js assets/theme-v2/css/layout.css assets/theme-v2/css/accordion.css assets/theme-v2/css/panels.css tests/playwright/tools/PaletteToolMockRepository.spec.mjs tests/playwright/tools/ToolCenterFullscreenAccordion.spec.mjs`
1016
- PASS, no matches
17+
- `npx playwright test tests/playwright/tools/ToolCenterFullscreenAccordion.spec.mjs --project=playwright --workers=1 --reporter=list`
18+
- PASS, 1 test
1119
- `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list`
1220
- PASS, 3 tests
1321
- `npm run test:playwright:static`
@@ -16,29 +24,37 @@ PASS
1624
- PASS
1725

1826
## Required Lanes
19-
- Targeted Palette Tool fullscreen UI lane: PASS.
27+
- Targeted shared Tool Center fullscreen UI lane: PASS.
28+
- Targeted Palette Tool runtime/UI lane: PASS.
2029
- Changed-file/static validation: PASS.
2130

2231
## Playwright Coverage
23-
- Fullscreen center panel overflow is hidden so page-level center scrolling is disabled: PASS.
24-
- Active Project Palette and Source Palette Browser split fullscreen vertical space evenly when both are expanded: PASS.
25-
- Collapsing Source Palette Browser expands Active Project Palette into the remaining available space: PASS.
26-
- Collapsing Active Project Palette expands Source Palette Browser into the remaining available space: PASS.
27-
- Active Project Palette swatch wrapper scrolls while its summary and control row stay fixed: PASS.
28-
- Source Palette Browser swatch wrapper scrolls while its summary and filter/control rows stay fixed: PASS.
29-
- Source Palette Browser DB-backed source loading, Pin All, pin, sort, size, and search behavior remain covered: PASS.
30-
- Active Project Palette selected swatch, remove/unpin, sort, size, and tag behavior remain covered: PASS.
32+
- Palette fullscreen center panel overflow remains hidden so page-level center scrolling is disabled: PASS.
33+
- Palette Active Project Palette and Source Palette Browser split fullscreen vertical space evenly when both are expanded: PASS.
34+
- Palette swatch wrappers scroll while summaries and control rows stay fixed: PASS.
35+
- Publish Tool Center direct accordions split fullscreen vertical space evenly when both are expanded: PASS.
36+
- Publish Tool Center direct accordion body scrolls while summary remains fixed: PASS.
37+
- Collapsing one Publish Tool Center accordion expands the remaining open accordion: PASS.
38+
- Palette selected summary omits the swatch symbol: PASS.
39+
- Source-pinned user Palette Colors start with empty tags: PASS.
40+
- Harmony-pinned user Palette Colors start with empty tags: PASS.
41+
- Harmony swatches use red/green pin state and click-to-add/click-to-remove behavior: PASS.
42+
- Harmony Add All skips duplicates: PASS.
3143

3244
## Impacted Lane
3345
- Palette Tool runtime/UI lane.
34-
- Theme V2 static validation for reusable fullscreen accordion layout classes.
46+
- Shared Tool Center fullscreen UI lane.
47+
- Theme V2 static validation for reusable fullscreen accordion and Tool Center panel layout classes.
3548

3649
## Skipped Lanes
3750
- Full samples smoke was skipped by BUILD instruction.
38-
- Broader tool lanes were skipped because changes are confined to Palette Tool fullscreen layout, reusable Theme V2 layout CSS, and the targeted Palette Tool spec.
51+
- Broader tool lanes were skipped because changes are confined to Palette Tool swatch/harmony behavior, reusable Theme V2 Tool Center fullscreen layout, and targeted specs for those surfaces.
3952

4053
## Not Run
4154
- Full samples smoke was not run, per BUILD instruction.
4255

56+
## Notes
57+
- A broader exploratory run of `tests/playwright/tools/ToolDisplayModeNavigation.spec.mjs` failed existing identity-row copy expectations unrelated to this PR. The required shared Tool Center fullscreen lane was covered by `tests/playwright/tools/ToolCenterFullscreenAccordion.spec.mjs`, which passed.
58+
4359
## Coverage Artifact
4460
- Final V8 coverage artifact: `docs_build/dev/reports/playwright_v8_coverage_report.txt`.

0 commit comments

Comments
 (0)