Skip to content

Commit 4fef530

Browse files
committed
Select newly added Palette swatches and show tooltip source - PR_26156_180-palette-added-selection-and-tooltip-source
1 parent 844028f commit 4fef530

6 files changed

Lines changed: 187 additions & 48 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# PR_26156_180 Palette Added Selection And Tooltip Source Report
2+
3+
## Result
4+
PASS
5+
6+
## Summary
7+
- Newly added Palette Colors now become selected immediately for user-defined adds, source pin/add, Source Pin All, harmony pin/add, and harmony Add All.
8+
- Multi-add operations select the last newly added swatch while duplicate-only runs keep the prior selection unchanged.
9+
- Swatch browser tooltips now use browser `title` text in the order Name, Hex, Source, Tags.
10+
- Empty user-tag sets omit the Tags line instead of showing `Tags: None`.
11+
- Active source labels now resolve to `custom` for user-defined swatches, the source palette label for copied source colors, and the harmony scheme label for generated harmony colors.
12+
13+
## Behavior Details
14+
- `replaceSwatches` accepts an explicit selected symbol so add/update callers can persist the intended selected swatch after table writes.
15+
- Source Pin All tracks the last successfully added swatch symbol and uses it as the selected item.
16+
- Harmony swatches persist their scheme source, such as `complementary` or `triadic`, so active Palette Colors can display the scheme label as Source.
17+
- Harmony rendered swatches suppress generated/source metadata tags in the tooltip; user palette colors still show only user-entered tags.
18+
19+
## Validation
20+
- `node --check toolbox/colors/colors.js`
21+
- PASS
22+
- `node --check toolbox/colors/palette-workspace-repository.js`
23+
- PASS
24+
- `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
25+
- PASS
26+
- `rg -n "DEFAULT_SOURCE_PALETTES|style=|<style|onclick|onchange|oninput|onsubmit" toolbox/colors/index.html toolbox/colors/colors.js toolbox/colors/palette-workspace-repository.js tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
27+
- PASS, no matches
28+
- `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list`
29+
- PASS, 3 tests
30+
- `npm run test:playwright:static`
31+
- PASS
32+
- `git diff --check -- toolbox/colors/colors.js toolbox/colors/palette-workspace-repository.js tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
33+
- PASS with Git LF-to-CRLF warning for the touched Playwright spec
34+
35+
## Verification Coverage
36+
- Newly added swatches become selected immediately.
37+
- Source Palette Browser direct pin/add selects the added swatch.
38+
- Pin All selects the last newly added swatch and duplicate-only Pin All keeps selection unchanged.
39+
- Harmony pin/add selects the added harmony swatch.
40+
- Harmony Add All selects the last newly added swatch and duplicate-only Add All keeps selection unchanged.
41+
- User Defined Swatch add selects the newly added custom swatch.
42+
- Tooltip text includes Source before Tags.
43+
- Color Harmony Source uses the scheme name.
44+
- User Defined Source displays as `custom`.
45+
- Tags line is omitted when the active user palette color has no user tags.
46+
47+
## Skipped
48+
- Full samples smoke was not run, per BUILD instruction.
49+
- Broad tool/runtime lanes were skipped because this PR changes only Palette Tool behavior and the targeted Palette Tool spec covers the affected runtime/UI paths.

docs_build/dev/reports/playwright_v8_coverage_report.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,27 @@ Note: entry percentages use function coverage when available, otherwise line cov
1212
Note: coverage entries are aggregated across every page/tool where coverageReporter.start(page) and coverageReporter.stop(page) ran.
1313

1414
Exercised tool entry points detected:
15-
(85%) Toolbox Index - exercised 5 runtime JS files
15+
(87%) Toolbox Index - exercised 5 runtime JS files
1616
(0%) Tool Template V2 - not exercised by this Playwright run
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 1218/1218; executed functions 116/134
20+
(89%) toolbox/colors/palette-workspace-repository.js - executed lines 1244/1244; executed functions 125/140
21+
(96%) toolbox/colors/colors.js - executed lines 794/794; executed functions 78/81
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 1218/1218; executed functions 116/134
28-
(95%) toolbox/colors/colors.js - executed lines 793/793; executed functions 77/81
28+
(89%) toolbox/colors/palette-workspace-repository.js - executed lines 1244/1244; executed functions 125/140
29+
(96%) toolbox/colors/colors.js - executed lines 794/794; executed functions 78/81
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
36-
(87%) toolbox/colors/palette-workspace-repository.js - changed JS file with browser V8 coverage
37+
(89%) toolbox/colors/palette-workspace-repository.js - changed JS file with browser V8 coverage
38+
(96%) toolbox/colors/colors.js - changed JS file with browser V8 coverage
Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PR_26156_179 Testing Lane Execution Report
1+
# PR_26156_180 Testing Lane Execution Report
22

33
## Result
44
PASS
@@ -10,41 +10,44 @@ PASS
1010
- PASS
1111
- `node --check tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
1212
- PASS
13-
- `rg "style=|<style|onclick|onchange|oninput|onsubmit" toolbox/colors/index.html toolbox/colors/colors.js toolbox/colors/palette-workspace-repository.js tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
13+
- `rg -n "DEFAULT_SOURCE_PALETTES|style=|<style|onclick|onchange|oninput|onsubmit" toolbox/colors/index.html toolbox/colors/colors.js toolbox/colors/palette-workspace-repository.js tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
1414
- PASS, no matches
1515
- `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs --project=playwright --workers=1 --reporter=list`
1616
- PASS, 3 tests
1717
- `npm run test:playwright:static`
1818
- PASS
19-
- `git diff --check`
20-
- PASS
19+
- `git diff --check -- toolbox/colors/colors.js toolbox/colors/palette-workspace-repository.js tests/playwright/tools/PaletteToolMockRepository.spec.mjs`
20+
- PASS with Git LF-to-CRLF warning for the touched Playwright spec
2121

2222
## Required Lanes
23-
- Targeted Palette Tool harmony runtime lane: PASS.
23+
- Targeted Palette Tool runtime/UI lane: PASS.
2424
- Changed-file/static validation: PASS.
2525

2626
## Playwright Coverage
27-
- Adding complementary harmony colors creates unique generated names: PASS.
28-
- Generated complementary suggestions that start as `Complementary 1` save as `Complementary 1` and `Complementary 2`: PASS.
29-
- Add All adds all non-duplicate generated harmony colors: PASS.
30-
- Repeated Add All skips existing harmony hex values without duplicates: PASS.
31-
- Duplicate-name validation still blocks true user-entered duplicate names: PASS.
32-
- Auto-generated harmony duplicate names are incremented instead of surfacing duplicate-name validation: PASS.
27+
- Source Palette Browser direct pin/add selects the newly added active swatch: PASS.
28+
- Source Pin All selects the last newly added swatch: PASS.
29+
- Duplicate-only Source Pin All keeps the existing selected swatch: PASS.
30+
- User Defined Swatch add selects the newly added custom swatch: PASS.
31+
- Harmony pin/add selects the newly added harmony swatch: PASS.
32+
- Harmony Add All selects the last newly added harmony swatch: PASS.
33+
- Duplicate-only Harmony Add All keeps the current selected swatch: PASS.
34+
- Browser tooltip order is Name, Hex, Source, Tags: PASS.
35+
- Empty active user-tag sets omit the Tags line: PASS.
3336

3437
## Impacted Lane
35-
- Palette Tool harmony runtime lane.
38+
- Palette Tool runtime/UI lane.
3639
- Changed-file/static validation lane.
3740

3841
## Skipped Lanes
3942
- Full samples smoke was skipped by BUILD instruction.
40-
- Shared Tool Center fullscreen UI lane was skipped because PR179 does not modify shared Tool Center or Theme V2 behavior.
41-
- Broader tool lanes were skipped because changes are confined to Palette harmony repository behavior and targeted Palette spec assertions.
43+
- Shared Tool Center fullscreen UI lane was skipped because PR180 does not modify shared Tool Center or Theme V2 behavior.
44+
- Broader tool lanes were skipped because changes are confined to Palette Tool repository/UI behavior and targeted Palette spec assertions.
4245

4346
## Not Run
4447
- Full samples smoke was not run, per BUILD instruction.
4548

4649
## Notes
47-
- Static validation generated companion reports during the run; non-required generated companion report updates were reverted so the PR remains scoped to the requested report artifacts.
50+
- Static validation generated companion reports during the run; non-required generated companion report updates were restored to their prior contents so the PR remains scoped to the requested report artifacts.
4851

4952
## Coverage Artifact
5053
- Final V8 coverage artifact: `docs_build/dev/reports/playwright_v8_coverage_report.txt`.

0 commit comments

Comments
 (0)