Skip to content

Commit a4bfd83

Browse files
author
DavidQ
committed
Refine Object Vector Studio V2 object hierarchy, selection, paint/stroke controls, and preview zoom behavior - PR_26132_020-object-vector-studio-v2-selection-paint-controls
1 parent b963646 commit a4bfd83

14 files changed

Lines changed: 667 additions & 216 deletions

docs/dev/reports/playwright_v8_coverage.txt

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ Exercised tool entry points detected:
2020
(0%) Workspace Manager - not exercised by this Playwright run
2121

2222
Changed runtime JS files covered:
23-
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 92/92; executed functions 4/5
24-
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 2907/2907; executed functions 318/355
23+
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 97/97; executed functions 4/5
24+
(89%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 3110/3110; executed functions 322/363
25+
(95%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 401/401; executed functions 52/55
26+
(98%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - executed lines 914/914; executed functions 105/107
2527

2628
Files with executed line/function counts where available:
2729
(2%) src/engine/input/ActionInputService.js - executed lines 397/397; executed functions 1/51
@@ -167,7 +169,7 @@ Files with executed line/function counts where available:
167169
(80%) src/engine/persistence/StorageService.js - executed lines 49/49; executed functions 4/5
168170
(80%) tools/asset-manager-v2/js/controls/AccordionSection.js - executed lines 27/27; executed functions 4/5
169171
(80%) tools/asset-manager-v2/js/controls/AssetFormControl.js - executed lines 563/563; executed functions 49/61
170-
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 92/92; executed functions 4/5
172+
(80%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 97/97; executed functions 4/5
171173
(80%) tools/palette-manager-v2/modules/PaletteHistoryStack.js - executed lines 54/54; executed functions 8/10
172174
(80%) tools/preview-generator-v2/controls/AccordionSection.js - executed lines 31/31; executed functions 4/5
173175
(80%) tools/preview-generator-v2/PreviewGeneratorV2Logger.js - executed lines 19/19; executed functions 4/5
@@ -192,8 +194,8 @@ Files with executed line/function counts where available:
192194
(88%) tools/text2speech-V2/js/controls/TextInputControl.js - executed lines 24/24; executed functions 7/8
193195
(88%) tools/world-vector-studio-v2/js/controls/SourceInputControl.js - executed lines 33/33; executed functions 7/8
194196
(89%) tools/asset-manager-v2/js/services/AssetSchemaValidator.js - executed lines 295/295; executed functions 25/28
197+
(89%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 3110/3110; executed functions 322/363
195198
(89%) tools/preview-generator-v2/controls/StatusLogControl.js - executed lines 32/32; executed functions 8/9
196-
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 2907/2907; executed functions 318/355
197199
(90%) tools/palette-manager-v2/modules/PaletteValidationService.js - executed lines 88/88; executed functions 9/10
198200
(90%) tools/text2speech-V2/js/controls/ActionNavControl.js - executed lines 117/117; executed functions 19/21
199201
(90%) tools/text2speech-V2/js/TextToSpeechToolApp.js - executed lines 807/807; executed functions 62/69
@@ -208,9 +210,9 @@ Files with executed line/function counts where available:
208210
(93%) tools/workspace-manager-v2/js/controls/ToolTilesControl.js - executed lines 137/137; executed functions 14/15
209211
(94%) games/shared/workspaceGameMetadataHydrator.js - executed lines 106/106; executed functions 16/17
210212
(94%) tools/common/PaletteSortService.js - executed lines 103/103; executed functions 17/18
211-
(95%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 406/406; executed functions 52/55
213+
(95%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - executed lines 401/401; executed functions 52/55
212214
(95%) tools/session-inspector-v2/js/services/SessionInspectorV2StorageService.js - executed lines 142/142; executed functions 18/19
213-
(98%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - executed lines 919/919; executed functions 105/107
215+
(98%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - executed lines 914/914; executed functions 105/107
214216
(100%) games/Asteroids/entities/Asteroid.js - executed lines 72/72; executed functions 11/11
215217
(100%) games/Asteroids/flow/attract.js - executed lines 17/17; executed functions 1/1
216218
(100%) games/Asteroids/flow/highscore.js - executed lines 16/16; executed functions 1/1
@@ -295,4 +297,6 @@ Changed JS files considered:
295297
(0%) tests/playwright/tools/WorkspaceManagerV2.spec.mjs - changed JS file not collected as browser runtime coverage
296298
(0%) tools/object-vector-studio-v2/tests/playwright/FirstClassToolStarter.spec.mjs - changed JS file not collected as browser runtime coverage
297299
(80%) tools/object-vector-studio-v2/js/bootstrap.js - changed JS file with browser V8 coverage
298-
(90%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed JS file with browser V8 coverage
300+
(89%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed JS file with browser V8 coverage
301+
(95%) tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js - changed JS file with browser V8 coverage
302+
(98%) src/engine/rendering/ObjectVectorRuntimeAssetService.js - changed JS file with browser V8 coverage
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# PR_26132_020-object-vector-studio-v2-selection-paint-controls
2+
3+
## Scope
4+
5+
Updates Object Vector Studio V2 selection, object typing, hierarchy display, paint/stroke controls, and direct schema/runtime references only. No sample JSON changes and no World Vector Studio V2 changes.
6+
7+
## Changes
8+
9+
- Replaced asset category with one singular Object type field that uses type-ahead suggestions from existing object types and tags.
10+
- Moved Object Actions to the bottom of the Objects accordion: Add, Rename, Duplicate, Delete.
11+
- Updated Rename so the object name and object id change together.
12+
- Reworked the Objects list into an `objects > object > shape` hierarchy with left-aligned text, selected object/shape highlighting, vertical scrolling, and icon-only eye/lock controls.
13+
- Removed the duplicated shape list from Object Details and removed duplicated preview shape buttons that already exist in the left control surface.
14+
- Moved z-order and grouping controls between Shape/Tools separators and kept shape tool buttons square with updated rectangle/circle/ellipse stroke weight and a five-sided polygon icon.
15+
- Added Select deselect behavior: clicking Select with a selected shape clears shape selection.
16+
- Added center mouse-wheel zoom on the Object Preview work surface.
17+
- Removed Current Color from Palette and added selected-color visual emphasis on the active swatch.
18+
- Implemented Paint and Stroke click behavior on shapes, including fill/stroke application, shift additive selection, alt eyedropper sampling, color swap, and default colors shortcuts.
19+
- Added keyboard shortcuts: `V` Select, `F` Paint/Fill, `S` Stroke, `I` Eyedropper, `X` Swap fill/stroke, and `D` Default colors.
20+
- Updated Object Vector Studio V2 docs to state that the paint/stroke model can scale later into shaders, gradients, patterns, neon, SVG export, and runtime rendering.
21+
- Updated Object Vector Studio V2 schema and direct runtime/schema services so `category` is rejected and durable object payloads use the singular `type` field.
22+
23+
## Validation
24+
25+
Playwright impacted: Yes.
26+
27+
Commands run:
28+
29+
- `node --check tools/object-vector-studio-v2/js/ToolStarterApp.js`
30+
- `node --check tools/object-vector-studio-v2/js/bootstrap.js`
31+
- `node --check tools/object-vector-studio-v2/js/services/ObjectVectorStudioV2SchemaService.js`
32+
- `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "shows Object Vector Studio V2 layout shell"`
33+
- `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list --grep "supports Object Vector Studio V2 asset library inheritance"`
34+
- `npm run test:workspace-v2`
35+
- `npx playwright test --config tools/object-vector-studio-v2/playwright.config.mjs --reporter=list`
36+
37+
Result:
38+
39+
- Focused Workspace Manager V2 Object Vector Studio checks passed.
40+
- Full Workspace Manager V2 suite passed: 45 passed.
41+
- Tool-local Object Vector Studio V2 suite passed: 4 passed.
42+
- Playwright V8 coverage refreshed at `docs/dev/reports/playwright_v8_coverage.txt`.
43+
- Full samples smoke test skipped per request; this PR is limited to Object Vector Studio V2 UI/control behavior and direct schema/runtime references, with Workspace V2 and tool-local Playwright coverage covering the impacted surface.
44+
45+
## Playwright Coverage
46+
47+
Validates:
48+
49+
- Singular Object type type-ahead and asset category removal.
50+
- Rename updates object id.
51+
- Object/shape hierarchy selection and selected highlighting.
52+
- Icon-only eye/lock controls and Objects container scrolling.
53+
- Object Details no longer duplicates the shape list.
54+
- Object Preview no longer duplicates shape action buttons.
55+
- Shape z-order/group controls are between Shape/Tools separators.
56+
- Selected color visual effect.
57+
- Center mouse-wheel zoom.
58+
- Select deselect behavior.
59+
- Paint/stroke click behavior and keyboard shortcuts.
60+
61+
Expected pass behavior:
62+
63+
- Object Vector Studio V2 exposes one object type, displays a usable object/shape hierarchy, applies paint/stroke controls to selected shapes, and keeps schema/runtime payloads free of asset category data.
64+
65+
Expected fail behavior:
66+
67+
- Invalid object/category payload drift, missing palette, missing selection, locked object edits, and invalid transforms log visible/actionable WARN/FAIL entries and do not partially mutate or render invalid state.
68+
69+
## Manual Validation
70+
71+
1. Open `tools/object-vector-studio-v2/index.html`.
72+
2. Load a valid Object Vector payload and runtime/session palette.
73+
3. Confirm Object type is a single type-ahead field and no asset category control is visible.
74+
4. Add and rename an object, then confirm the object id changes with the name.
75+
5. Create shapes, select them from the Objects hierarchy, and confirm selected object/shape highlighting.
76+
6. Use eye/lock icons on object tiles and shape rows.
77+
7. Select Paint or Stroke, click shapes, and confirm fill/stroke values update.
78+
8. Use `V`, `F`, `S`, `I`, `X`, and `D` shortcuts and confirm the Status Log records the operation.
79+
9. Mouse-wheel over the center work surface and confirm zoom changes.
80+
81+
Expected outcome:
82+
83+
- Object Vector Studio V2 presents the requested hierarchy, selection, paint/stroke, and keyboard control model with no duplicated Object Details/Preview controls and no asset category payload persistence.
84+
85+
## Out Of Scope
86+
87+
- No sample JSON changes.
88+
- No World Vector Studio V2 changes.
89+
- No new major feature systems beyond the requested selection/paint control behavior.
90+
- No full samples smoke test.

games/Asteroids/game.manifest.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,42 +218,36 @@
218218
"id": "asset.asteroids.ship",
219219
"name": "Asteroids Ship",
220220
"objectId": "object.asteroids.ship",
221-
"category": "ship",
222221
"tags": ["asteroids", "player", "ship"]
223222
},
224223
{
225224
"id": "asset.asteroids.asteroid.large",
226225
"name": "Large Asteroid",
227226
"objectId": "object.asteroids.asteroid.large",
228-
"category": "object",
229227
"tags": ["asteroids", "asteroid", "large"]
230228
},
231229
{
232230
"id": "asset.asteroids.asteroid.medium",
233231
"name": "Medium Asteroid",
234232
"objectId": "object.asteroids.asteroid.medium",
235-
"category": "object",
236233
"tags": ["asteroids", "asteroid", "medium"]
237234
},
238235
{
239236
"id": "asset.asteroids.asteroid.small",
240237
"name": "Small Asteroid",
241238
"objectId": "object.asteroids.asteroid.small",
242-
"category": "object",
243239
"tags": ["asteroids", "asteroid", "small"]
244240
},
245241
{
246242
"id": "asset.asteroids.ufo.large",
247243
"name": "Large UFO",
248244
"objectId": "object.asteroids.ufo.large",
249-
"category": "enemy",
250245
"tags": ["asteroids", "ufo", "large"]
251246
},
252247
{
253248
"id": "asset.asteroids.ufo.small",
254249
"name": "Small UFO",
255250
"objectId": "object.asteroids.ufo.small",
256-
"category": "enemy",
257251
"tags": ["asteroids", "ufo", "small"]
258252
}
259253
]

src/engine/rendering/ObjectVectorRuntimeAssetService.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,6 @@ export class ObjectVectorRuntimeAssetService {
881881
const normalizedObject = {
882882
...object,
883883
baseObjectId: typeof object.baseObjectId === "string" ? object.baseObjectId.trim() : undefined,
884-
category: typeof object.category === "string" ? object.category.trim() : undefined,
885884
id: object.id.trim(),
886885
name: object.name.trim(),
887886
tags: Array.isArray(object.tags) ? object.tags.map((tag) => tag.trim()).filter(Boolean) : undefined,
@@ -910,9 +909,6 @@ export class ObjectVectorRuntimeAssetService {
910909
if (normalizedObject.baseObjectId === undefined) {
911910
delete normalizedObject.baseObjectId;
912911
}
913-
if (normalizedObject.category === undefined) {
914-
delete normalizedObject.category;
915-
}
916912
if (normalizedObject.tags === undefined) {
917913
delete normalizedObject.tags;
918914
}
@@ -921,7 +917,6 @@ export class ObjectVectorRuntimeAssetService {
921917
if (normalized.assetLibrary) {
922918
normalized.assetLibrary = {
923919
assets: normalized.assetLibrary.assets.map((asset) => ({
924-
category: asset.category.trim(),
925920
id: asset.id.trim(),
926921
name: asset.name.trim(),
927922
objectId: asset.objectId.trim(),

0 commit comments

Comments
 (0)