Skip to content

Commit 2254d89

Browse files
author
DavidQ
committed
Preserve Sample Palette scroll position after individual pin actions - PR_26124_064-palette-manager-source-pin-scroll-preserve
1 parent f126af1 commit 2254d89

9 files changed

Lines changed: 255 additions & 1638 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
# Codex Commands - PR_26124_063-palette-manager-tag-sort-untagged-last
1+
# Codex Commands - PR_26124_064-palette-manager-source-pin-scroll-preserve
22

33
## Workflow
44
- Read `docs/dev/PROJECT_INSTRUCTIONS.md`.
55
- Used `.codex/skills/repo-build/SKILL.md`.
66
- Checked git status before implementation.
7-
- Created `docs/pr/PR_26124_063-palette-manager-tag-sort-untagged-last/PLAN_PR.md`.
8-
- Created `docs/pr/PR_26124_063-palette-manager-tag-sort-untagged-last/BUILD_PR.md`.
7+
- Created `docs/pr/PR_26124_064-palette-manager-source-pin-scroll-preserve/PLAN_PR.md`.
8+
- Created `docs/pr/PR_26124_064-palette-manager-source-pin-scroll-preserve/BUILD_PR.md`.
99
- Read the active BUILD doc before changing runtime files.
10-
- Updated only `tools/palette-manager-v2/modules/PaletteManagerApp.js`.
11-
- Created `docs/pr/PR_26124_063-palette-manager-tag-sort-untagged-last/APPLY_PR.md`.
10+
- Updated only `tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js`.
11+
- Created `docs/pr/PR_26124_064-palette-manager-source-pin-scroll-preserve/APPLY_PR.md`.
1212

1313
## Validation Commands
14-
- `node --check tools/palette-manager-v2/modules/PaletteManagerApp.js`
15-
- Targeted served-browser Palette Manager V2 Tag ascending/descending sort validation using Playwright from Node.
14+
- `node --check tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js`
15+
- Targeted served-browser Palette Manager V2 individual source pin/unpin scroll preservation validation using Playwright from Node.
1616
- `git diff --check`
1717
- `npm run test:workspace-v2`
1818
- `git diff --cached --check`
1919
- `npm run codex:review-artifacts`
20-
- Python `zipfile` packaging for `tmp/PR_26124_063-palette-manager-tag-sort-untagged-last_delta.zip`
20+
- Python `zipfile` packaging for `tmp/PR_26124_064-palette-manager-source-pin-scroll-preserve_delta.zip`
2121

2222
## Validation Outcome
2323
- JavaScript syntax check: PASS.
24-
- Targeted served-browser Palette Manager V2 Tag sort validation: PASS.
25-
- `git diff --check`: PASS.
24+
- Targeted served-browser Palette Manager V2 individual source pin/unpin scroll preservation validation: PASS.
25+
- `git diff --check`: PASS with Git LF-to-CRLF warning for generated review artifact.
2626
- `git diff --cached --check`: PASS.
2727
- `npm run test:workspace-v2`: FAILED because the script is missing from `package.json`.
2828
- 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-
Keep untagged swatches last in Palette Manager Tag sort - PR_26124_063-palette-manager-tag-sort-untagged-last
1+
Preserve Palette Manager source scroll after pin render - PR_26124_064-palette-manager-source-pin-scroll-preserve
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# PR_26124_064-palette-manager-source-pin-scroll-preserve Report
2+
3+
## Summary
4+
Implemented a Palette Manager V2-only source grid scroll preservation timing fix.
5+
6+
## Changes
7+
- `SourcePaletteBrowserControl.preserveSourceScrollDuring` now captures the source grid scroll position before the pin/unpin action.
8+
- The source grid scroll position is restored with `requestAnimationFrame` after the app render replaces the source grid contents.
9+
- Pin/unpin behavior itself is unchanged.
10+
- Pin All still uses the same helper and may benefit naturally from the post-render restore path.
11+
12+
## Validation
13+
- `node --check tools/palette-manager-v2/controls/SourcePaletteBrowserControl.js`: PASS.
14+
- Targeted served-browser Palette Manager V2 individual source pin/unpin scroll preservation validation: PASS.
15+
- `git diff --check`: PASS with Git LF-to-CRLF warning for generated review artifact.
16+
- `npm run test:workspace-v2`: FAIL, `package.json` does not define `test:workspace-v2`.
17+
- Full samples smoke test: skipped because this PR is limited to Palette Manager V2 source grid scroll timing and sample JSON remains out of scope.
18+
19+
## Manual Test Notes
20+
1. Open Palette Manager V2.
21+
2. Scroll the Sample/Source Palette grid down.
22+
3. Click an individual red pin and confirm the source grid remains at the same scroll position after render.
23+
4. Click an individual green pin/unpin and confirm the source grid remains at the same scroll position after render.
24+
5. Confirm Clear checkbox behavior, tag sorting, pin button size, and Validation/Error Viewer behavior are unchanged.
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
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_061_report.md
5-
MM docs/dev/reports/codex_changed_files.txt
6-
MM docs/dev/reports/codex_review.diff
7-
A docs/pr/PR_26124_061-palette-manager-tag-clear-undo-location-and-pin-scroll/APPLY_PR.md
8-
A docs/pr/PR_26124_061-palette-manager-tag-clear-undo-location-and-pin-scroll/BUILD_PR.md
9-
A docs/pr/PR_26124_061-palette-manager-tag-clear-undo-location-and-pin-scroll/PLAN_PR.md
4+
A docs/dev/reports/PR_26124_064_report.md
5+
M docs/dev/reports/codex_changed_files.txt
6+
M docs/dev/reports/codex_review.diff
7+
A docs/pr/PR_26124_064-palette-manager-source-pin-scroll-preserve/APPLY_PR.md
8+
A docs/pr/PR_26124_064-palette-manager-source-pin-scroll-preserve/BUILD_PR.md
9+
A docs/pr/PR_26124_064-palette-manager-source-pin-scroll-preserve/PLAN_PR.md
1010
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
1511

1612
# git diff --stat
17-
docs/dev/reports/codex_changed_files.txt | 8 +-
18-
docs/dev/reports/codex_review.diff | 1231 +++++++++++++++++++++++++++++-
19-
2 files changed, 1232 insertions(+), 7 deletions(-)
13+
docs/dev/reports/codex_changed_files.txt | 18 +-
14+
docs/dev/reports/codex_review.diff | 1738 +++---------------------------
15+
2 files changed, 129 insertions(+), 1627 deletions(-)

0 commit comments

Comments
 (0)