Skip to content

Commit 1911a71

Browse files
author
DavidQ
committed
Clean up Object Vector Studio icon assets layout spacing tests and geometry headers - PR_26133_022-object-vector-studio-layout-icons-and-test-cleanup
1 parent 39338f7 commit 1911a71

12 files changed

Lines changed: 181 additions & 308 deletions

File tree

tools/object-vector-studio-v2/starter-project-template/README.md renamed to docs/dev/archive/object-vector-studio-v2/starter-project-template/README.md

File renamed without changes.

tools/object-vector-studio-v2/starter-project-template/config/starter.project.json renamed to docs/dev/archive/object-vector-studio-v2/starter-project-template/config/starter.project.json

File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PR_26133_022 Starter Template Report
2+
3+
## Inspection
4+
5+
- Inspected `tools/object-vector-studio-v2/starter-project-template`.
6+
- Searched active tool, test, script, package, and docs/dev report paths for references to the active path.
7+
- No active references to `tools/object-vector-studio-v2/starter-project-template` were found.
8+
9+
## Result
10+
11+
- Moved the unused template out of the active Object Vector Studio V2 tool path.
12+
- Archived location: `docs/dev/archive/object-vector-studio-v2/starter-project-template`.
13+
- The template was not deleted silently.
14+
15+
## Boundary Checks
16+
17+
- `src/shared/font/0xProtoNerdFont` was not deleted, moved, or modified.
18+
- No sample JSON files were changed.
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PR_26133_021 Playwright V8 Coverage Report
1+
# PR_26133_022 Playwright V8 Coverage Report
22

33
Coverage source: `docs/dev/reports/playwright_v8_coverage_report.txt`, refreshed by the final `npm run test:workspace-v2` run.
44

@@ -7,16 +7,18 @@ Coverage source: `docs/dev/reports/playwright_v8_coverage_report.txt`, refreshed
77
- Coverage is advisory only; no thresholds are enforced.
88
- Workspace Manager V2 entry point: `(91%) Workspace Manager V2 - exercised 10 runtime JS files`.
99
- Changed Object Vector Studio V2 runtime JS coverage from the generated report:
10-
- `(83%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 106/106; executed functions 5/6`
11-
- `(93%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 4092/4092; executed functions 442/476`
10+
- `(83%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 107/107; executed functions 5/6`
11+
- `(93%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 4096/4096; executed functions 443/477`
1212
- Changed JS files considered by the generated report:
1313
- `tools/object-vector-studio-v2/js/bootstrap.js`: covered by browser V8 coverage.
1414
- `tools/object-vector-studio-v2/js/ToolStarterApp.js`: covered by browser V8 coverage.
15+
- `tools/object-vector-studio-v2/playwright.config.mjs`: not collected as browser runtime coverage.
16+
- `tests/playwright/tools/ObjectVectorStudioV2FirstClassToolStarter.spec.mjs`: not collected as browser runtime coverage.
1517
- `tests/playwright/tools/WorkspaceManagerV2.spec.mjs`: not collected as browser runtime coverage.
1618

1719
## Validation Context
1820

1921
- Main command: `npm run test:workspace-v2`.
2022
- Result: 48 passed.
21-
- Focused Object Vector Studio V2 palette, icon mapping, Object Geometry header, polygon checkbox add/delete, transform icon, geometry-layout, preview coordinate, mouse-editing, animation-state, and asset-library scenarios passed as part of the workspace-v2 run.
22-
- Coverage includes the PR21 Object Vector Studio V2 runtime changes for glyph mapping, Object Geometry header state, and polygon point controls.
23+
- Focused Object Vector Studio V2 scenarios covered the Nerd Font icon mapping cleanup, tighter accordion spacing, Object Geometry header layout, Object Transform summary placement, palette same-line controls, polygon Add Point behavior, preview coordinate/grid behavior, mouse editing, animation states, and asset-library scenarios.
24+
- The required moved spec also passed through `npx playwright test --config=tools/object-vector-studio-v2/playwright.config.mjs --workers=1 --reporter=list`.

docs/dev/reports/playwright_workspace_v2_results.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
# PR_26133_021 Workspace V2 Results
1+
# PR_26133_022 Workspace V2 Results
22

33
## Command Results
44

55
- `node --check tools/object-vector-studio-v2/js/ToolStarterApp.js`: passed.
66
- `node --check tools/object-vector-studio-v2/js/bootstrap.js`: passed.
7+
- `node --check tests/playwright/tools/ObjectVectorStudioV2FirstClassToolStarter.spec.mjs`: passed.
78
- `node --check tests/playwright/tools/WorkspaceManagerV2.spec.mjs`: passed.
8-
- `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "shows Object Vector Studio V2 layout shell and schema-only palette gate"`: 1 passed.
9+
- `npx playwright test --config=tools/object-vector-studio-v2/playwright.config.mjs --workers=1 --reporter=list`: 4 passed.
910
- `npm run test:workspace-v2`: 48 passed.
10-
- `git diff --check`: passed with LF-to-CRLF working-copy warnings for touched files.
11+
- `git diff --check`: passed with LF-to-CRLF working-copy warnings only.
1112

1213
## Targeted Object Vector Studio V2 Verification
1314

14-
- Confirmed Palette no longer renders a `Stroke Width` label; `Width` sits to the right of the Stroke button in the palette control row.
15-
- Confirmed Shape/Tools icons use the requested mappings for Angle Snap, Select, Triangle, Rectangle, and existing tool glyphs; Select/Triangle/Rectangle are enlarged and Rectangle is offset upward.
16-
- Confirmed Object Transform action buttons use `nf-fa-scale_unbalanced` for Scale and `nf-md-resize` for Resize.
17-
- Confirmed Object Details is renamed to Object Geometry and the selected shape summary appears in the accordion header while the body no longer repeats `Shape <id> (<type>)`.
18-
- Confirmed polygon point rows expose checkboxes, Add Side inserts after the checked point and clears selections, Delete Point removes checked rows and clears selections, and invalid deletes are visibly rejected before schema-invalid point counts can apply.
19-
- Confirmed Object Add/Rename/Dup controls render directly under Object Name and above the Tag line.
20-
- Confirmed Object Vector Studio V2 tests reported no console/page errors in the targeted browser scenarios.
21-
- Confirmed `src/shared/font/0xProtoNerdFont` was preserved.
15+
- Confirmed old pre-Nerd Font CSS icon drawings were removed from active Object Vector Studio V2 icon classes while `src/shared/font/0xProtoNerdFont` remained untouched.
16+
- Confirmed Grid Snap uses `nf-md-vector_point`; Select, Triangle, and Line use the requested icon offsets/sizing adjustments.
17+
- Confirmed Object Vector Studio V2 accordion spacing is tighter through reduced panel gap, header height/padding, content padding, and status header height.
18+
- Confirmed the moved Playwright spec runs from `tests/playwright/tools/ObjectVectorStudioV2FirstClassToolStarter.spec.mjs` through the updated tool config.
19+
- Confirmed the unused starter template was moved to `docs/dev/archive/object-vector-studio-v2/starter-project-template` and documented in `object_vector_studio_starter_template_report.md`.
20+
- Confirmed Object Transform no longer renders `Selected Shape: <id>` and places the live transform summary below the transform action buttons.
21+
- Confirmed Add Tag icon sizing matches Add Object, and polygon `Add Side` is renamed to `Add Point`.
22+
- Confirmed Palette Paint, Stroke, and Width controls render on one line with a compact Width input.
23+
- Confirmed Object Geometry header renders as `Object Geometry (type)` on the first line and the selected shape id on the next line.
24+
- Confirmed Object Vector Studio V2 targeted browser scenarios reported no console/page errors.
2225

2326
## Scope Checks
2427

tools/object-vector-studio-v2/tests/playwright/FirstClassToolStarter.spec.mjs renamed to tests/playwright/tools/ObjectVectorStudioV2FirstClassToolStarter.spec.mjs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { extname, join, normalize, relative, resolve } from "node:path";
44
import { readFile, stat, writeFile } from "node:fs/promises";
55
import { fileURLToPath } from "node:url";
66

7-
const REPO_ROOT = resolve(fileURLToPath(new URL("../../../..", import.meta.url)));
7+
const REPO_ROOT = resolve(fileURLToPath(new URL("../../..", import.meta.url)));
88
const CONTENT_TYPES = new Map([
99
[".css", "text/css; charset=utf-8"],
1010
[".html", "text/html; charset=utf-8"],
@@ -71,16 +71,17 @@ test.describe("Object Vector Studio V2", () => {
7171
await expect(page.locator("#objectVectorStudioV2CopyJsonButton")).toBeDisabled();
7272
await expect(page.locator("#objectVectorStudioV2ExportJsonButton")).toBeDisabled();
7373
await expect(page.locator("#objectVectorStudioV2PaletteSwatchCount")).toHaveText("(0 swatches)");
74-
await expect(page.locator("#objectVectorStudioV2ObjectDetailsCount")).toHaveText("(0 obj, 0 shapes)");
74+
await expect(page.locator("#objectVectorStudioV2ObjectsCount")).toHaveText("(0 obj, 0 shapes)");
7575
await expect(page.locator("#objectVectorStudioV2ObjectTiles")).toContainText("No objects loaded");
7676
await expect(page.locator("#objectVectorStudioV2RenameObjectButton")).toBeDisabled();
77-
await expect(page.locator("#objectVectorStudioV2DeleteObjectButton")).toBeDisabled();
77+
await expect(page.locator("#objectVectorStudioV2ObjectTransform")).toHaveText("No shape selected.");
7878
await expect(page.locator("#objectVectorStudioV2FlattenObjectButton")).toHaveCount(0);
7979
await expect(page.getByRole("button", { name: "Object", exact: true })).toBeVisible();
8080
await expect(page.getByRole("button", { name: "Shape/Tools", exact: true })).toBeVisible();
81-
await expect(page.getByRole("button", { name: "Objects", exact: true })).toBeVisible();
81+
await expect(page.getByRole("button", { name: "Objects (0 obj, 0 shapes)" })).toBeVisible();
8282
await expect(page.getByRole("button", { name: "Palette (0 swatches)" })).toBeVisible();
83-
await expect(page.getByRole("button", { name: "Object Details (0 obj, 0 shapes)" })).toBeVisible();
83+
await expect(page.getByRole("button", { name: "Object Geometry", exact: true })).toBeVisible();
84+
await expect(page.getByRole("button", { name: "Object Transform", exact: true })).toBeVisible();
8485
await expect(page.getByRole("button", { name: "JSON Details" })).toBeVisible();
8586
await expect(page.locator("#statusLog")).toHaveValue(/Object Vector Studio V2 layout shell ready\./);
8687
await expect(page.locator("#statusLog")).toHaveValue(/INFO Shape\/Tools primitive buttons create schema-valid shapes on the selected object\./);
@@ -125,17 +126,17 @@ test.describe("Object Vector Studio V2", () => {
125126

126127
await page.locator("#objectVectorStudioV2ObjectNameInput").fill("Local Object");
127128
await page.locator("#objectVectorStudioV2AddObjectButton").click();
128-
await expect(page.locator("#objectVectorStudioV2ObjectDetailsCount")).toHaveText("(3 obj, 0 shapes)");
129+
await expect(page.locator("#objectVectorStudioV2ObjectsCount")).toHaveText("(3 obj, 0 shapes)");
129130
await expect(page.locator('[data-object-id="object.local.local-object"]')).toHaveAttribute("aria-pressed", "true");
130131
await expect(page.locator("#objectVectorStudioV2JsonDetails")).toContainText('"name": "Local Object"');
131132

132133
await page.locator('[data-shape-tool="rectangle"]').click();
133-
await expect(page.locator("#objectVectorStudioV2ObjectDetailsCount")).toHaveText("(3 obj, 1 shape)");
134+
await expect(page.locator("#objectVectorStudioV2ObjectsCount")).toHaveText("(3 obj, 1 shape)");
134135
await expect(page.locator("#objectVectorStudioV2RenderSurface [data-shape-id='rectangle-1']")).toHaveClass(/is-selected/);
135136
await expect(page.locator("#statusLog")).toHaveValue(/OK Created rectangle shape rectangle-1 on Local Object\./);
136137

137-
await page.locator("#objectVectorStudioV2DeleteObjectButton").click();
138-
await expect(page.locator("#objectVectorStudioV2ObjectDetailsCount")).toHaveText("(2 obj, 0 shapes)");
138+
await page.locator('[data-object-id="object.local.local-object"] [data-object-control="delete"]').click();
139+
await expect(page.locator("#objectVectorStudioV2ObjectsCount")).toHaveText("(2 obj, 0 shapes)");
139140
await expect(page.locator('[data-object-id="object.local.local-object"]')).toHaveCount(0);
140141
});
141142

0 commit comments

Comments
 (0)