Skip to content

Commit 25fb295

Browse files
author
DavidQ
committed
Allow Object Vector V2 Shape Geometry panel to use available vertical space - PR_26133_112-object-vector-shape-geometry-layout
1 parent 76ee16f commit 25fb295

4 files changed

Lines changed: 105 additions & 1 deletion

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PR_26133_112-object-vector-shape-geometry-layout Report
2+
3+
## Summary
4+
- Read `docs/dev/PROJECT_INSTRUCTIONS.md` before implementation.
5+
- Used available `PR_26133_111-engine-background-render-pipeline_report.md` as prior reference; the `PR_26133_111` delta ZIP was not present under `tmp/`.
6+
- Scoped the change to Object Vector Studio V2 Shape Geometry layout only.
7+
- Added a dedicated Shape Geometry accordion class and CSS rules so the Shape Geometry panel can flex into available right-panel vertical space and is no longer capped by the shared `260px` content max-height.
8+
- Preserved transform, snap, scale, and collision behavior; no geometry calculation JavaScript was changed.
9+
10+
## Changed Files
11+
- `tools/object-vector-studio-v2/index.html`
12+
- `tools/object-vector-studio-v2/styles/toolStarter.css`
13+
- `tests/playwright/tools/WorkspaceManagerV2.spec.mjs`
14+
- `docs/dev/reports/PR_26133_112-object-vector-shape-geometry-layout_report.md`
15+
16+
## Validation
17+
- PASS: `node --check tests/playwright/tools/WorkspaceManagerV2.spec.mjs`
18+
- PASS: `git diff --check -- tools/object-vector-studio-v2/index.html tools/object-vector-studio-v2/styles/toolStarter.css tests/playwright/tools/WorkspaceManagerV2.spec.mjs docs/dev/reports/playwright_v8_coverage_report.txt docs/dev/reports/coverage_changed_js_guardrail.txt` (line-ending warnings only)
19+
- PASS: `npx playwright test tests/playwright/tools/WorkspaceManagerV2.spec.mjs --project=playwright --workers=1 --reporter=list -g "compacts Object Vector Studio V2 geometry layouts and selected palette state"` (1 passed)
20+
- PASS: targeted Object Vector V2 layout validation asserted Shape Geometry uses the dedicated layout class, removes the old content max-height cap, flexes its accordion/content, and grows beyond the previous `260px` limit when neighboring right-panel sections are collapsed.
21+
- PASS: `npm run test:workspace-v2` (56 passed)
22+
23+
## Playwright
24+
- Playwright impacted: Yes.
25+
- Validated Object Vector Studio V2 Shape Geometry layout expansion, selected palette state, geometry field compact layout, and the full Workspace V2 regression gate.
26+
- Expected pass behavior: Shape Geometry can use freed vertical space while existing Object Vector geometry controls continue to render and behave normally.
27+
- Expected fail behavior: tests fail if Shape Geometry remains capped at `260px`, loses its layout hook, fails to flex, or Workspace V2 regressions appear.
28+
29+
## Full Samples Smoke
30+
- Skipped full samples smoke test by request.
31+
- Reason: this is a targeted Object Vector V2 panel layout change covered by targeted Playwright and `npm run test:workspace-v2`; sample JSON launch validation remains out-of-scope.
32+
33+
## Manual Validation
34+
1. Open `tools/object-vector-studio-v2/index.html`.
35+
2. Import or create an object with a selected shape.
36+
3. Collapse neighboring right-panel sections such as Palette, Tools, Shapes, and Shape Transform.
37+
4. Expected: Shape Geometry expands vertically into the available right-panel space, its fields remain usable, and fullscreen frame/control behavior remains unchanged.
38+
39+
## ZIP
40+
- Output path: `tmp/PR_26133_112-object-vector-shape-geometry-layout_delta.zip`

tests/playwright/tools/WorkspaceManagerV2.spec.mjs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4899,9 +4899,18 @@ test.describe("Workspace Manager V2 bootstrap", () => {
48994899
expect(Math.abs(layout.tops[left] - layout.tops[right])).toBeLessThanOrEqual(3);
49004900
});
49014901
};
4902+
const setRightAccordionOpen = async (contentId, open) => {
4903+
const header = page.locator(`.tool-starter__panel--right [aria-controls="${contentId}"]`).first();
4904+
const expanded = await header.getAttribute("aria-expanded");
4905+
if ((expanded === "true") !== open) {
4906+
await header.click();
4907+
}
4908+
await expect(header).toHaveAttribute("aria-expanded", String(open));
4909+
};
49024910

49034911
await coverageReporter.start(page);
49044912
try {
4913+
await page.setViewportSize({ width: 1366, height: 1000 });
49054914
await page.goto(`${server.baseUrl}/tools/object-vector-studio-v2/index.html`, { waitUntil: "networkidle" });
49064915
await page.evaluate(() => {
49074916
sessionStorage.setItem("object-vector-studio-v2.runtimePalette", JSON.stringify({
@@ -5043,6 +5052,42 @@ test.describe("Workspace Manager V2 bootstrap", () => {
50435052
await expect(page.locator("#objectVectorStudioV2ShapeGeometryDetails [data-polygon-side-action]")).toHaveCount(0);
50445053
await expect(page.locator("#objectVectorStudioV2ShapeGeometryDetails [data-polygon-point-select='true']")).toHaveCount(0);
50455054
await expect.poll(() => page.locator("#objectVectorStudioV2ShapeGeometryDetails .object-vector-studio-v2__polygon-point-field").evaluateAll((rows) => rows.map((row) => row.querySelectorAll("input[type='checkbox']").length))).toEqual([1, 1, 1]);
5055+
await setRightAccordionOpen("objectVectorStudioV2PaletteContent", false);
5056+
await setRightAccordionOpen("objectVectorStudioV2ShapeToolsContent", false);
5057+
await setRightAccordionOpen("objectVectorStudioV2ShapesContent", false);
5058+
await setRightAccordionOpen("objectVectorStudioV2ShapeTransformContent", false);
5059+
const expandedShapeGeometryLayout = await page.locator("#objectVectorStudioV2ShapeGeometryDetails").evaluate((details) => {
5060+
const content = document.querySelector("#objectVectorStudioV2ShapeGeometryContent");
5061+
const accordion = document.querySelector(".object-vector-studio-v2__shape-geometry-accordion");
5062+
const contentRect = content.getBoundingClientRect();
5063+
const detailsRect = details.getBoundingClientRect();
5064+
const contentStyle = getComputedStyle(content);
5065+
const accordionStyle = getComputedStyle(accordion);
5066+
return {
5067+
accordionFlexGrow: Number.parseFloat(accordionStyle.flexGrow),
5068+
accordionHasLayoutClass: accordion.classList.contains("object-vector-studio-v2__shape-geometry-accordion"),
5069+
contentFlexGrow: Number.parseFloat(contentStyle.flexGrow),
5070+
contentHeight: Math.round(contentRect.height),
5071+
contentMaxHeight: contentStyle.maxHeight,
5072+
detailsHeight: Math.round(detailsRect.height),
5073+
paletteExpanded: document.querySelector('[aria-controls="objectVectorStudioV2PaletteContent"]').getAttribute("aria-expanded"),
5074+
shapeToolOptionsExpanded: document.querySelector('[aria-controls="objectVectorStudioV2ShapeToolsContent"]').getAttribute("aria-expanded"),
5075+
shapeToolsExpanded: document.querySelector('[aria-controls="objectVectorStudioV2ShapesContent"]').getAttribute("aria-expanded"),
5076+
transformExpanded: document.querySelector('[aria-controls="objectVectorStudioV2ShapeTransformContent"]').getAttribute("aria-expanded")
5077+
};
5078+
});
5079+
expect(expandedShapeGeometryLayout).toMatchObject({
5080+
accordionHasLayoutClass: true,
5081+
contentMaxHeight: "none",
5082+
paletteExpanded: "false",
5083+
shapeToolOptionsExpanded: "false",
5084+
shapeToolsExpanded: "false",
5085+
transformExpanded: "false"
5086+
});
5087+
expect(expandedShapeGeometryLayout.accordionFlexGrow).toBeGreaterThanOrEqual(1);
5088+
expect(expandedShapeGeometryLayout.contentFlexGrow).toBeGreaterThanOrEqual(1);
5089+
expect(expandedShapeGeometryLayout.contentHeight).toBeGreaterThan(260);
5090+
expect(expandedShapeGeometryLayout.detailsHeight).toBeGreaterThan(240);
50465091

50475092
expect(pageErrors).toEqual([]);
50485093
expect(consoleErrors).toEqual([]);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ <h2 class="tools-platform-frame__eyebrow">First-Class Tools Surface V2</h2>
327327
</div>
328328
</section>
329329

330-
<section class="accordion-v2 tool-starter__accordion tool-starter__accordion--compact is-open" data-accordion-v2-open="true">
330+
<section class="accordion-v2 tool-starter__accordion tool-starter__accordion--compact object-vector-studio-v2__shape-geometry-accordion is-open" data-accordion-v2-open="true">
331331
<button class="accordion-v2__header" type="button" aria-expanded="true" aria-controls="objectVectorStudioV2ShapeGeometryContent">
332332
<span class="object-vector-studio-v2__geometry-header-title">
333333
<span class="object-vector-studio-v2__geometry-header-line">Shape Geometry <span id="objectVectorStudioV2ShapeGeometrySummary" class="object-vector-studio-v2__header-count"></span></span>

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,25 @@ textarea:hover {
448448
max-height: 260px;
449449
}
450450

451+
.tool-starter__panel--right > .object-vector-studio-v2__shape-geometry-accordion.is-open {
452+
flex: 1 1 320px;
453+
min-height: 220px;
454+
}
455+
456+
.tool-starter__panel--right > .accordion-v2.object-vector-studio-v2__shape-geometry-accordion.is-open > .accordion-v2__content#objectVectorStudioV2ShapeGeometryContent {
457+
flex: 1 1 auto;
458+
max-height: none;
459+
}
460+
461+
#objectVectorStudioV2ShapeGeometryDetails {
462+
flex: 1 1 auto;
463+
min-height: 0;
464+
}
465+
466+
#objectVectorStudioV2ShapeGeometryDetails > .object-vector-studio-v2__object-detail-stack {
467+
min-height: 100%;
468+
}
469+
451470
.object-vector-studio-v2__palette-swatch-list {
452471
display: grid;
453472
flex: 0 0 auto;

0 commit comments

Comments
 (0)