Skip to content

Commit 45561df

Browse files
author
DavidQ
committed
Add toggle sort direction for Palette Manager V2 user and source palettes - PR_26124_056-palette-manager-sort-toggle-direction
1 parent 4db1200 commit 45561df

13 files changed

Lines changed: 677 additions & 201 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
# Codex Commands - PR_26124_055-palette-manager-center-menu-actions
1+
# Codex Commands - PR_26124_056-palette-manager-sort-toggle-direction
22

33
## Workflow
44
- Read `docs/dev/PROJECT_INSTRUCTIONS.md`.
55
- Used `.codex/skills/repo-build/SKILL.md`.
6-
- Created `docs/pr/PR_26124_055-palette-manager-center-menu-actions/PLAN_PR.md`.
7-
- Created `docs/pr/PR_26124_055-palette-manager-center-menu-actions/BUILD_PR.md`.
6+
- Created `docs/pr/PR_26124_056-palette-manager-sort-toggle-direction/PLAN_PR.md`.
7+
- Created `docs/pr/PR_26124_056-palette-manager-sort-toggle-direction/BUILD_PR.md`.
88
- Updated Palette Manager V2 only.
9-
- Created `docs/pr/PR_26124_055-palette-manager-center-menu-actions/APPLY_PR.md`.
9+
- Created `docs/pr/PR_26124_056-palette-manager-sort-toggle-direction/APPLY_PR.md`.
1010

1111
## Validation Commands
12-
- CSS-only change; no JavaScript syntax check required.
13-
- Targeted served-browser Palette Manager V2 menu alignment check using Playwright from Node.
12+
- `node --check tools/palette-manager-v2/modules/PaletteManagerApp.js`
13+
- `node --check tools/palette-manager-v2/controls/UserPaletteControl.js`
14+
- `node --check tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js`
15+
- Targeted served-browser Palette Manager V2 sort toggle and direction indicator check using Playwright from Node.
1416
- `git diff --check`
1517
- `npm run test:workspace-v2`
1618
- `git diff --cached --check`
1719
- `npm run codex:review-artifacts`
18-
- Python `zipfile` packaging for `tmp/PR_26124_055-palette-manager-center-menu-actions_delta.zip`
20+
- Python `zipfile` packaging for `tmp/PR_26124_056-palette-manager-sort-toggle-direction_delta.zip`
1921

2022
## Validation Outcome
21-
- JavaScript syntax checks: not applicable; CSS-only implementation.
23+
- JavaScript syntax checks: PASS.
2224
- Targeted served-browser Palette Manager V2 behavior check: PASS.
23-
- `git diff --check`: PASS with Git LF-to-CRLF warnings for changed HTML/CSS files.
25+
- `git diff --check`: PASS with Git LF-to-CRLF warnings for changed HTML/CSS files already in the working tree.
2426
- `git diff --cached --check`: PASS.
2527
- `npm run test:workspace-v2`: FAILED because the script is missing from `package.json`.
2628
- Review artifacts: generated.

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Center Palette Manager menu JSON actions - PR_26124_055-palette-manager-center-menu-actions
1+
Add Palette Manager sort direction toggles - PR_26124_056-palette-manager-sort-toggle-direction
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# PR_26124_056 Report - Palette Manager Sort Toggle Direction
2+
3+
## Scope
4+
- Updated Palette Manager V2 sort JavaScript only.
5+
- Added PR workflow docs and review artifacts.
6+
- Did not modify workspace/toolState/session behavior.
7+
- Did not modify sample JSON.
8+
- Did not modify `tools/shared`.
9+
- Did not add dependencies.
10+
11+
## Implementation
12+
- Replaced single sort-mode state with independent sort key and direction state for User Palette and Source Palette.
13+
- Added local Palette Manager sort options that include Tag for both palettes.
14+
- Preserved shared Hue, Saturation, Brightness, and Name ascending sorting by using the existing sort service, then reversing for descending.
15+
- Added local Tag sorting by normalized lowercase tag text.
16+
- Added first-click ascending behavior even when the default active sort key is clicked.
17+
- Added active button direction labels using `` and ``.
18+
19+
## Validation
20+
- `node --check tools/palette-manager-v2/modules/PaletteManagerApp.js`: PASS.
21+
- `node --check tools/palette-manager-v2/controls/UserPaletteControl.js`: PASS.
22+
- `node --check tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js`: PASS.
23+
- Targeted served-browser Palette Manager V2 sort toggle validation: PASS.
24+
- `git diff --check`: PASS with Git LF-to-CRLF warnings for changed HTML/CSS files already in the working tree.
25+
- `npm run test:workspace-v2`: FAIL. The repository `package.json` has no `test:workspace-v2` script.
26+
- Full samples smoke test: skipped by instruction.
27+
28+
## Targeted Browser Coverage
29+
- Confirmed User Palette and Source Palette sort controls both include Tag.
30+
- Confirmed default active Hue shows ascending.
31+
- Confirmed first click on default Source Hue keeps ascending.
32+
- Confirmed second click on Source Hue toggles descending.
33+
- Confirmed clicking Source Name resets to ascending.
34+
- Confirmed User Name ascending and descending order.
35+
- Confirmed User Tag ascending and descending order, including untagged swatches.
36+
- Confirmed User and Source sort direction state remain independent.
Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
# git status --short
22
M docs/dev/codex_commands.md
33
M docs/dev/commit_comment.txt
4-
A docs/dev/reports/PR_26124_055_report.md
4+
A docs/dev/reports/PR_26124_056_report.md
55
M docs/dev/reports/codex_changed_files.txt
66
MM docs/dev/reports/codex_review.diff
7-
A docs/pr/PR_26124_055-palette-manager-center-menu-actions/APPLY_PR.md
8-
A docs/pr/PR_26124_055-palette-manager-center-menu-actions/BUILD_PR.md
9-
A docs/pr/PR_26124_055-palette-manager-center-menu-actions/PLAN_PR.md
10-
M tools/palette-manager-v2/paletteManagerV2.css
7+
A docs/pr/PR_26124_056-palette-manager-sort-toggle-direction/APPLY_PR.md
8+
A docs/pr/PR_26124_056-palette-manager-sort-toggle-direction/BUILD_PR.md
9+
A docs/pr/PR_26124_056-palette-manager-sort-toggle-direction/PLAN_PR.md
10+
M tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js
11+
M tools/palette-manager-v2/controls/UserPaletteControl.js
12+
M tools/palette-manager-v2/index.html
13+
M tools/palette-manager-v2/modules/PaletteManagerApp.js
14+
M tools/palette-manager-v2/paletteManagerV2.css
1115

1216
# git diff --cached --stat
13-
docs/dev/codex_commands.md | 20 +-
14-
docs/dev/commit_comment.txt | 2 +-
15-
docs/dev/reports/PR_26124_055_report.md | 27 +
16-
docs/dev/reports/codex_changed_files.txt | 29 +-
17-
docs/dev/reports/codex_review.diff | 1115 +++-----------------
18-
.../APPLY_PR.md | 23 +
19-
.../BUILD_PR.md | 28 +
20-
.../PLAN_PR.md | 37 +
21-
tools/palette-manager-v2/paletteManagerV2.css | 12 +-
22-
9 files changed, 270 insertions(+), 1023 deletions(-)
17+
docs/dev/codex_commands.md | 20 +-
18+
docs/dev/commit_comment.txt | 2 +-
19+
docs/dev/reports/PR_26124_056_report.md | 36 ++
20+
docs/dev/reports/codex_changed_files.txt | 31 +-
21+
docs/dev/reports/codex_review.diff | 537 ++++++++++++++++-----
22+
.../APPLY_PR.md | 29 ++
23+
.../BUILD_PR.md | 40 ++
24+
.../PLAN_PR.md | 44 ++
25+
.../controls/SourcePaletteBrowserControl.js | 17 +-
26+
.../controls/UserPaletteControl.js | 17 +-
27+
.../modules/PaletteManagerApp.js | 100 +++-
28+
11 files changed, 675 insertions(+), 198 deletions(-)

0 commit comments

Comments
 (0)