Skip to content

Make stacks restored from a GridLayoutDocument resizeable - #2707

Merged
heswell merged 1 commit into
mainfrom
fix-restored-stack-resizeable
Nov 6, 2026
Merged

heswell merged 1 commit into
mainfrom
fix-restored-stack-resizeable

Conversation

@heswell

@heswell heswell commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

A layout restored from a GridLayoutDocument has no GridLayoutStackedItem template, so each stack's stacked-content item was created with no resizeable setting. A missing setting counts as fixed in both directions, so the stack and its neighbours got no splitters, even when every member set resizeable: "hv".

Change

  • useGridLayout.tsx: when there is no stack template, take minHeight, minWidth and resizeable from the first stack member. Members share one grid area, and this matches what gridSnapshotToGridStackStates and createStack already do.
  • GridStackSnapshot is unchanged. Stack metadata stays on the members, so a round-trip through the document already keeps it.

Tests

  • New Playwright CT test in GridLayoutDocument.playwright.test.tsx: restores a document with a resizable item beside a stack, checks a splitter exists between them, and checks dragging it changes the column sizes. It fails without the fix and passes with it.
  • All grid-layout Vitest and Playwright tests pass.

🤖 Generated with Claude Code

A layout restored from a document has no GridLayoutStackedItem template,
so the stacked-content item was created with no resizeable setting and
counted as fixed in both directions: no splitters for the stack or its
neighbours.

When there is no template, take minHeight, minWidth and resizeable from
the first stack member. Members share one grid area, and this matches
gridSnapshotToGridStackStates and createStack. GridStackSnapshot is
unchanged: durable stack metadata stays on the members, so document
round-trips already keep it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for papaya-valkyrie-395400 canceled.

Name Link
🔨 Latest commit 917a3ca
🔍 Latest deploy log https://app.netlify.com/projects/papaya-valkyrie-395400/deploys/6aed8349aa9cd4efe4fbe11f

@heswell
heswell merged commit 39b036e into main Nov 6, 2026
17 checks passed
@heswell
heswell deleted the fix-restored-stack-resizeable branch November 6, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant