Skip to content

Commit c6845bf

Browse files
author
DavidQ
committed
Add per point rounding and constrain snap icon coloring while wiring Snap Angle - PR_26133_077-point-rounding-snap-icon-color-and-snap-angle-wiring
1 parent 308a587 commit c6845bf

8 files changed

Lines changed: 323 additions & 266 deletions

File tree

docs/dev/reports/playwright_v8_coverage_report.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Playwright V8 Coverage Report
22

3-
PR: PR_26133_076-snap-angle-disabled-colors-and-point-style-refinement
3+
PR: PR_26133_077-point-rounding-snap-icon-color-and-snap-angle-wiring
44

55
Source: docs/dev/reports/playwright_v8_coverage_report.txt generated by the latest npm run test:workspace-v2 run.
66

@@ -21,11 +21,9 @@ Source: docs/dev/reports/playwright_v8_coverage_report.txt generated by the late
2121

2222
## Changed Runtime JS Files Covered
2323

24-
- (83%) tools/object-vector-studio-v2/js/bootstrap.js - executed lines 109/109; executed functions 5/6
25-
- (96%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 6855/6855; executed functions 689/720
24+
- (96%) tools/object-vector-studio-v2/js/ToolStarterApp.js - executed lines 6933/6933; executed functions 712/745
2625

2726
## Changed JS Files Considered
2827

29-
- (83%) tools/object-vector-studio-v2/js/bootstrap.js - changed runtime JS file with browser V8 coverage
3028
- (96%) tools/object-vector-studio-v2/js/ToolStarterApp.js - changed runtime JS file with browser V8 coverage
3129
- (0%) tests/playwright/tools/WorkspaceManagerV2.spec.mjs - Playwright test file, not collected as browser runtime coverage

docs/dev/reports/playwright_workspace_v2_results.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Playwright Workspace V2 Results
22

3-
PR: PR_26133_076-snap-angle-disabled-colors-and-point-style-refinement
3+
PR: PR_26133_077-point-rounding-snap-icon-color-and-snap-angle-wiring
44

55
## Validation
66

77
- PASS: npm run test:workspace-v2
88
- Result: 54 passed
9-
- Runtime: 4.6m
9+
- Runtime: 5.2m
1010
- Browser project: playwright
1111
- Workers: 1
1212

1313
## Targeted Checks Covered
1414

15-
- Snap control naming uses Snap Angle, including title, button text, aria label, and status log output.
16-
- Inactive Shape/Tools and Snap Angle icons share one disabled/inactive color; Snap None uses the same color.
17-
- Snap Point button color matches visible point snap target circles.
18-
- Shape Geometry Point Style UI renders Start, Joints, and End controls, with line/arc joints disabled and polyline joints wired.
19-
- Angled square line caps render as rotated markers aligned to the line angle instead of detached axis-aligned rectangles.
20-
- Palette accordion/content sizing collapses to the control content without the old empty bottom space.
15+
- Shape Geometry point rows render Round checkboxes and no longer render the prior Start/Joints/End dropdown model.
16+
- Point rows default square; checked point rows persist `style.pointRounding` and render round joins/markers.
17+
- Polygon/polyline point lists size naturally without an internal scrollbar.
18+
- Snap color behavior is scoped to Snap button glyphs: Snap None uses the red disabled tone, Snap Point matches point snap circles, and non-Snap icons keep default colors.
19+
- Future notes include spline as a tracked possible geometry addition.
20+
- Snap Angle rotate application is logged visibly as active or disabled, and enabled Snap Angle constrains Rotate to the snap increment.
2121

2222
## Console/Runtime Errors
2323

tests/playwright/tools/WorkspaceManagerV2.spec.mjs

Lines changed: 69 additions & 74 deletions
Large diffs are not rendered by default.

tools/object-vector-studio-v2/js/ToolStarterApp.js

Lines changed: 194 additions & 108 deletions
Large diffs are not rendered by default.

tools/object-vector-studio-v2/possible.future.adds.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Architecture notes from recent discussion:
1616
- Most likely next geometry addition.
1717
- Would support connected open point sequences without requiring polygon closure.
1818

19+
- spline
20+
- Possible future addition for smooth point-driven curves.
21+
- Would need explicit control-point, interpolation, and runtime tessellation contracts before implementation.
22+
1923
- path
2024
- Possible future addition for richer vector authoring.
2125
- Would require a stricter schema/editor contract before implementation.

tools/object-vector-studio-v2/styles/toolStarter.css

Lines changed: 22 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ button {
5656

5757
.object-vector-studio-v2 {
5858
--object-vector-studio-v2-icon-scale: 1.75;
59-
--object-vector-studio-v2-disabled-icon-color: #64748b;
59+
--object-vector-studio-v2-snap-disabled-icon-color: #ef4444;
6060
--object-vector-studio-v2-snap-point-color: #fbbf24;
6161
}
6262

@@ -67,11 +67,6 @@ button:disabled {
6767
box-shadow: none;
6868
}
6969

70-
button:disabled[data-ovs-icon],
71-
button:disabled [data-ovs-icon] {
72-
color: var(--object-vector-studio-v2-disabled-icon-color) !important;
73-
}
74-
7570
button:focus-visible,
7671
input:focus-visible,
7772
select:focus-visible,
@@ -1022,17 +1017,17 @@ textarea:hover {
10221017
transform: none;
10231018
}
10241019

1025-
.object-vector-studio-v2__tool-toggle:not(.is-active):not([aria-pressed="true"]) .object-vector-studio-v2__shape-icon[data-ovs-icon],
1026-
.object-vector-studio-v2__snap-actions button[aria-pressed="false"][data-ovs-icon] {
1027-
color: var(--object-vector-studio-v2-disabled-icon-color);
1020+
.object-vector-studio-v2__snap-actions button[data-ovs-icon]::before {
1021+
color: inherit;
10281022
}
10291023

1030-
#objectVectorStudioV2SnapModeButton[data-snap-mode="point"][data-ovs-icon] {
1024+
#objectVectorStudioV2SnapModeButton[data-snap-mode="point"][data-ovs-icon]::before {
10311025
color: var(--object-vector-studio-v2-snap-point-color);
10321026
}
10331027

1034-
#objectVectorStudioV2SnapModeButton[data-snap-mode="none"][data-ovs-icon] {
1035-
color: var(--object-vector-studio-v2-disabled-icon-color);
1028+
#objectVectorStudioV2SnapModeButton[data-snap-mode="none"][data-ovs-icon]::before,
1029+
#objectVectorStudioV2AngleSnapButton[aria-pressed="false"][data-ovs-icon]::before {
1030+
color: var(--object-vector-studio-v2-snap-disabled-icon-color);
10361031
}
10371032

10381033
.object-vector-studio-v2__shape-icon[data-ovs-icon] {
@@ -1621,9 +1616,9 @@ textarea:hover {
16211616
.object-vector-studio-v2__polygon-point-list {
16221617
display: grid;
16231618
gap: 5px;
1624-
max-height: 138px;
1625-
overflow-y: auto;
1626-
padding-right: 2px;
1619+
max-height: none;
1620+
overflow: visible;
1621+
padding-right: 0;
16271622
}
16281623

16291624
.object-vector-studio-v2__edit-panel--polygon {
@@ -1652,50 +1647,6 @@ textarea:hover {
16521647
line-height: 1.1;
16531648
}
16541649

1655-
.object-vector-studio-v2__point-style-controls {
1656-
display: flex;
1657-
align-items: center;
1658-
gap: 4px;
1659-
min-width: 0;
1660-
}
1661-
1662-
.object-vector-studio-v2__point-style-heading {
1663-
flex: 0 0 auto;
1664-
color: var(--tool-starter-muted);
1665-
font-size: 0.76rem;
1666-
font-weight: 800;
1667-
white-space: nowrap;
1668-
}
1669-
1670-
.object-vector-studio-v2__point-style-fields {
1671-
min-width: 0;
1672-
display: flex;
1673-
align-items: center;
1674-
gap: 5px;
1675-
flex-wrap: nowrap;
1676-
}
1677-
1678-
.object-vector-studio-v2__point-style-field {
1679-
display: inline-grid;
1680-
grid-template-columns: max-content minmax(58px, 1fr);
1681-
align-items: center;
1682-
gap: 4px;
1683-
color: var(--tool-starter-muted);
1684-
font-size: 0.72rem;
1685-
font-weight: 800;
1686-
}
1687-
1688-
.object-vector-studio-v2__point-style-field select {
1689-
min-width: 0;
1690-
width: 72px;
1691-
min-height: 24px;
1692-
padding: 2px 4px;
1693-
}
1694-
1695-
.object-vector-studio-v2__point-style-field select:disabled {
1696-
color: var(--object-vector-studio-v2-disabled-icon-color);
1697-
}
1698-
16991650
.object-vector-studio-v2__edit-panel--geometry .object-vector-studio-v2__edit-grid {
17001651
gap: 4px 6px;
17011652
}
@@ -1723,7 +1674,7 @@ textarea:hover {
17231674

17241675
.object-vector-studio-v2__polygon-point-field {
17251676
display: grid;
1726-
grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr) 22px;
1677+
grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1fr) max-content 22px;
17271678
align-items: center;
17281679
gap: 6px;
17291680
}
@@ -1768,6 +1719,17 @@ textarea:hover {
17681719
min-width: 0;
17691720
}
17701721

1722+
.object-vector-studio-v2__polygon-point-rounding {
1723+
display: inline-grid;
1724+
grid-template-columns: max-content 14px;
1725+
align-items: center;
1726+
gap: 3px;
1727+
color: var(--tool-starter-muted);
1728+
font-size: 0.7rem;
1729+
font-weight: 800;
1730+
}
1731+
1732+
.object-vector-studio-v2__polygon-point-rounding input,
17711733
.object-vector-studio-v2__polygon-point-toggle input {
17721734
width: 14px;
17731735
height: 14px;

tools/schemas/game.manifest.schema.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@
274274
"fill": "#ffffff",
275275
"stroke": "#ffffff",
276276
"strokeWidth": 3,
277-
"pointStyle": "round",
278-
"startPointStyle": "round",
279-
"endPointStyle": "round",
277+
"pointStyle": "square",
278+
"startPointStyle": "square",
279+
"endPointStyle": "square",
280280
"fillOpacity": 1,
281281
"strokeOpacity": 1
282282
},
@@ -448,9 +448,9 @@
448448
"fill": "#ffffff",
449449
"stroke": "#ffffff",
450450
"strokeWidth": 3,
451-
"pointStyle": "round",
452-
"startPointStyle": "round",
453-
"endPointStyle": "round",
451+
"pointStyle": "square",
452+
"startPointStyle": "square",
453+
"endPointStyle": "square",
454454
"fillOpacity": 1,
455455
"strokeOpacity": 1
456456
},
@@ -481,6 +481,12 @@
481481
"type": "string",
482482
"enum": ["round", "square"]
483483
},
484+
"pointRounding": {
485+
"type": "array",
486+
"items": {
487+
"type": "boolean"
488+
}
489+
},
484490
"fillOpacity": {
485491
"type": "number",
486492
"minimum": 0,

tools/schemas/tools/object-vector-studio-v2.schema.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@
187187
"fill": "#ffffff",
188188
"stroke": "#ffffff",
189189
"strokeWidth": 3,
190-
"pointStyle": "round",
191-
"startPointStyle": "round",
192-
"endPointStyle": "round",
190+
"pointStyle": "square",
191+
"startPointStyle": "square",
192+
"endPointStyle": "square",
193193
"fillOpacity": 1,
194194
"strokeOpacity": 1
195195
},
@@ -421,9 +421,9 @@
421421
"fill": "#ffffff",
422422
"stroke": "#ffffff",
423423
"strokeWidth": 3,
424-
"pointStyle": "round",
425-
"startPointStyle": "round",
426-
"endPointStyle": "round",
424+
"pointStyle": "square",
425+
"startPointStyle": "square",
426+
"endPointStyle": "square",
427427
"fillOpacity": 1,
428428
"strokeOpacity": 1
429429
},
@@ -456,6 +456,12 @@
456456
"type": "string",
457457
"enum": ["round", "square"]
458458
},
459+
"pointRounding": {
460+
"type": "array",
461+
"items": {
462+
"type": "boolean"
463+
}
464+
},
459465
"fillOpacity": {
460466
"type": "number",
461467
"minimum": 0,

0 commit comments

Comments
 (0)