Skip to content

Add explicit Rows control so tall frames pack a full grid#66

Merged
ankitsejwal merged 1 commit into
mainfrom
sheet-grid-rows
Jun 28, 2026
Merged

Add explicit Rows control so tall frames pack a full grid#66
ankitsejwal merged 1 commit into
mainfrom
sheet-grid-rows

Conversation

@ankitsejwal

Copy link
Copy Markdown
Member

What

Adds a Rows stepper next to Per row so the sheet is an explicit perRow × rows grid.

Why

"Per row" alone fixed each cell's width and let the row count fall out of whatever the page height allowed. A tall frame at 2-up is ~140 mm tall on A4, so two rows overflowed the 277 mm usable height by a hair — it dropped to one row → 2 frames per page, leaving the sheet half empty.

How

sheetLayout now takes rows and sizes each cell to the largest that fits both the column-width and row-height budgets (tall shapes are height-bound), then centres the grid on the printable area, splitting slack evenly. Frames per sheet = perRow × rows, independent of shape.

A tall 2×2 now packs four frames and fills the page; square/wide center cleanly with even margins. Threaded through the preview, PDF export, and project/session settings (old files fall back to the default).

Verified live: tall page 2×2 = 4 fills the sheet, square page 2×2 = 4 centers; typecheck + lint clean.

🤖 Generated with Claude Code

Per row alone fixed cell width and let rows fall out of whatever the
page height allowed, so tall frames at 2-up overflowed to a single row
(2 per page) and left the sheet half empty. Add a Rows setting and size
each cell to fit both the column-width and row-height budgets, centring
the grid on the printable area. A tall 2x2 now packs four frames and
fills the page; the count per sheet is exactly perRow x rows.
@ankitsejwal ankitsejwal merged commit 0bf95ec into main Jun 28, 2026
1 check passed
@ankitsejwal ankitsejwal deleted the sheet-grid-rows branch June 28, 2026 22:17
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