Skip to content

Commit 99ca943

Browse files
author
DavidQ
committed
Format polygon and polyline double click completion help text - PR_26133_068-polygon-polyline-completion-help-text
1 parent b54035f commit 99ca943

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

tests/playwright/tools/WorkspaceManagerV2.spec.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,8 @@ test.describe("Workspace Manager V2 bootstrap", () => {
15241524
add: title("#objectVectorStudioV2AddObjectButton"),
15251525
angle: title("#objectVectorStudioV2AngleSnapButton"),
15261526
grid: title("#objectVectorStudioV2GridRenderButton"),
1527+
polygon: title("[data-shape-tool='polygon']"),
1528+
polyline: title("[data-shape-tool='polyline']"),
15271529
rename: title("#objectVectorStudioV2RenameObjectButton"),
15281530
shape: title("[data-shape-tool='rectangle']"),
15291531
zoomIn: title("#objectVectorStudioV2ZoomInButton")
@@ -1644,6 +1646,8 @@ test.describe("Workspace Manager V2 bootstrap", () => {
16441646
add: "Add a schema-valid object to the loaded payload",
16451647
angle: "When enabled, the Rotate action rounds the entered rotation delta to 15 degree increments.",
16461648
grid: "Show or hide the preview grid",
1649+
polygon: "Create a polygon shape on the selected object. Click to add points.\n\nDouble-click to finish.",
1650+
polyline: "Create a polyline shape on the selected object. Click to add points.\n\nDouble-click to finish.",
16471651
rename: "Disabled until a schema-valid object is selected.",
16481652
shape: "Create a rectangle shape on the selected object",
16491653
zoomIn: "Zoom the work surface in"
@@ -3478,6 +3482,10 @@ test.describe("Workspace Manager V2 bootstrap", () => {
34783482
await page.locator("#objectVectorStudioV2StrokeModeButton").click();
34793483
await page.locator("[data-palette-color='#6fd3ff']").click();
34803484

3485+
await page.locator('[data-shape-tool="polygon"]').click();
3486+
await expect(page.locator("#statusLog")).toHaveValue(/OK Drawing mode selected: Polygon\. Click to add points\.\n\nDouble-click to finish\./);
3487+
await page.locator('[data-shape-tool="polyline"]').click();
3488+
await expect(page.locator("#statusLog")).toHaveValue(/OK Drawing mode selected: Polyline\. Click to add points\.\n\nDouble-click to finish\./);
34813489
await page.locator('[data-shape-tool="rectangle"]').click();
34823490
await expect(page.locator('[data-shape-tool="rectangle"]')).toHaveAttribute("aria-pressed", "true");
34833491
await expect(page.locator("#objectVectorStudioV2RenderSurface")).toHaveClass(/is-drawing-mode/);

tools/object-vector-studio-v2/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,11 @@ <h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface V2</h2>
241241
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--picker" aria-hidden="true"></span>
242242
<span class="object-vector-studio-v2__tool-label">Picker</span>
243243
</button>
244-
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="polygon" title="Create a polygon shape on the selected object">
244+
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="polygon" title="Create a polygon shape on the selected object. Click to add points.&#10;&#10;Double-click to finish.">
245245
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--polygon" aria-hidden="true"></span>
246246
<span class="object-vector-studio-v2__tool-label">Polygon</span>
247247
</button>
248-
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="polyline" title="Create a polyline shape on the selected object">
248+
<button class="object-vector-studio-v2__tool-toggle" type="button" aria-pressed="false" data-shape-tool="polyline" title="Create a polyline shape on the selected object. Click to add points.&#10;&#10;Double-click to finish.">
249249
<span class="object-vector-studio-v2__shape-icon object-vector-studio-v2__shape-icon--polyline" aria-hidden="true"></span>
250250
<span class="object-vector-studio-v2__tool-label">Polyline</span>
251251
</button>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3375,7 +3375,10 @@ export class ToolStarterApp {
33753375
this.drawingPreviewPoint = null;
33763376
this.renderWorkSurface();
33773377
const objectHint = this.selectedObject() ? "" : " Select a schema-valid object before committing geometry.";
3378-
this.statusLog.write(`OK Drawing mode selected: ${shapeTypeLabel(tool)}. Use canvas pointer input to create geometry.${objectHint}`);
3378+
const drawingHelp = ["polygon", "polyline"].includes(tool)
3379+
? "Click to add points.\n\nDouble-click to finish."
3380+
: "Use canvas pointer input to create geometry.";
3381+
this.statusLog.write(`OK Drawing mode selected: ${shapeTypeLabel(tool)}. ${drawingHelp}${objectHint}`);
33793382
}
33803383

33813384
createDrawingState(tool) {

0 commit comments

Comments
 (0)