Skip to content

Commit 652ade2

Browse files
authored
Merge pull request #259 from ToolboxAid/PR_26179_CHARLIE_023-sprites-toolbar-placeholders
PR_26179_CHARLIE_023-sprites-toolbar-placeholders
2 parents b7905b7 + 178646a commit 652ade2

5 files changed

Lines changed: 203 additions & 534 deletions

File tree

dev/tests/playwright/tools/SpritesToolShell.spec.mjs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ import { getToolRegistrySnapshot } from "../../../../toolbox/toolRegistry.js";
99
const __filename = fileURLToPath(import.meta.url);
1010
const __dirname = path.dirname(__filename);
1111
const repoRoot = path.resolve(__dirname, "..", "..", "..", "..");
12+
const SPRITE_TOOLBAR_PLACEHOLDERS = [
13+
"Pencil",
14+
"Eraser",
15+
"Fill",
16+
"Line",
17+
"Rectangle",
18+
"Circle",
19+
"Picker",
20+
"Move",
21+
"Zoom",
22+
];
1223

1324
function contentTypeForPath(filePath) {
1425
const extension = path.extname(filePath).toLowerCase();
@@ -216,9 +227,11 @@ test("Sprite Creator shell loads with visible tool, canvas, details, and status
216227
await expect(page.getByText("Canvas Setup")).toBeVisible();
217228
await expect(page.getByRole("heading", { level: 2, name: "Pixel Work Area" })).toBeVisible();
218229
await expect(page.getByRole("heading", { level: 2, name: "Sprite Details" })).toBeVisible();
219-
await expect(page.getByRole("button", { name: "Pencil" })).toBeDisabled();
220-
await expect(page.getByRole("button", { name: "Eraser" })).toBeDisabled();
221-
await expect(page.getByRole("button", { name: "Fill" })).toBeDisabled();
230+
await expect(page.locator("[data-sprites-toolbar]")).toBeVisible();
231+
for (const toolName of SPRITE_TOOLBAR_PLACEHOLDERS) {
232+
await expect(page.getByRole("button", { name: `${toolName} tool placeholder` })).toBeDisabled();
233+
}
234+
await expect(page.locator("main")).toContainText("Toolbar placeholders only");
222235
await expect(page.locator("[data-sprites-pixel-grid]")).toBeVisible();
223236
await expect(page.locator("[data-sprites-shell-status]")).toContainText("Shell ready");
224237
await expect(page.locator("main")).toContainText("Palette/Colors keys only");
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# PR_26179_CHARLIE_023-sprites-toolbar-placeholders
2+
3+
Team: CHARLIE
4+
Workflow: stacked feature workflow
5+
Base branch: PR_26179_CHARLIE_022-sprites-tool-shell
6+
Canonical ZIP path: dev/workspace/zip/PR_26179_CHARLIE_023-sprites-toolbar-placeholders_delta.zip
7+
8+
## Summary
9+
10+
Added Sprite Creator toolbar placeholders for Pencil, Eraser, Fill, Line, Rectangle, Circle, Picker, Move, and Zoom. This PR intentionally adds visible controls only; no drawing behavior, persistence, API, DB, schema, or authoritative browser product data was added.
11+
12+
## Branch Validation
13+
14+
PASS
15+
16+
- Current branch: PR_26179_CHARLIE_023-sprites-toolbar-placeholders
17+
- Based on: PR_26179_CHARLIE_022-sprites-tool-shell
18+
- No start_of_day files changed
19+
- No DB/API/schema files changed
20+
- No stale PR #219-#228 code copied
21+
22+
## Requirement Checklist
23+
24+
| Requirement | Status | Notes |
25+
| --- | --- | --- |
26+
| Add Pencil placeholder | PASS | Visible disabled control. |
27+
| Add Eraser placeholder | PASS | Visible disabled control. |
28+
| Add Fill placeholder | PASS | Visible disabled control. |
29+
| Add Line placeholder | PASS | Visible disabled control. |
30+
| Add Rectangle placeholder | PASS | Visible disabled control. |
31+
| Add Circle placeholder | PASS | Visible disabled control. |
32+
| Add Picker placeholder | PASS | Visible disabled control. |
33+
| Add Move placeholder | PASS | Visible disabled control. |
34+
| Add Zoom placeholder | PASS | Visible disabled control. |
35+
| No drawing behavior | PASS | Buttons remain disabled; no new runtime JS. |
36+
| No DB/API/schema changes | PASS | Changed only shell/test/report files. |
37+
| No browser-owned authoritative product data | PASS | No product persistence added. |
38+
| No stale PR #219-#228 code | PASS | Direct current-main stack edit only. |
39+
40+
## Validation Lane Report
41+
42+
Commands:
43+
44+
```text
45+
node --check dev/tests/playwright/tools/SpritesToolShell.spec.mjs
46+
node --check src/shared/toolbox/tool-metadata-inventory.js
47+
git diff --check -- toolbox/sprites/index.html dev/tests/playwright/tools/SpritesToolShell.spec.mjs
48+
rg --pcre2 -n -i "<style|style=|<script(?![^>]+src=)|on(click|change|submit|input|load|error)=|imageDataUrl|local-mem|fake-login|MEM DB" toolbox/sprites/index.html dev/tests/playwright/tools/SpritesToolShell.spec.mjs
49+
npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs --workers=1 --reporter=list --output=<temp>
50+
```
51+
52+
Results:
53+
54+
- Node syntax checks: PASS
55+
- `git diff --check`: PASS
56+
- Guard scan: PASS, no matches
57+
- Targeted Playwright: PASS, 1 test passed
58+
59+
## Manual Validation Notes
60+
61+
1. Open `/toolbox/sprites/index.html` from the stacked branch.
62+
2. Confirm the Sprite Tools panel shows Pencil, Eraser, Fill, Line, Rectangle, Circle, Picker, Move, and Zoom.
63+
3. Confirm toolbar controls are placeholders only and disabled.
64+
4. Confirm there is no drawing behavior yet.
65+
66+
## ZIP Path
67+
68+
`dev/workspace/zip/PR_26179_CHARLIE_023-sprites-toolbar-placeholders_delta.zip`
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
toolbox/sprites/index.html
2-
src/shared/toolbox/tool-metadata-inventory.js
32
dev/tests/playwright/tools/SpritesToolShell.spec.mjs
4-
docs_build/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md
3+
docs_build/dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md
54
docs_build/dev/reports/codex_changed_files.txt
65
docs_build/dev/reports/codex_review.diff

0 commit comments

Comments
 (0)