M2: Suggest auto layout warns about uneven cross offsets and refuses instances (#1823)

Bands that start at different offsets across the flow (a centred title above a card) are lined up at the smallest offset, which moves some of them, so the result now carries a warning for it. Instances and layers inside them are refused before anything changes, with the same error Convert to group gives; a main component still works.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Trevor Brown
2026-11-05 11:55:12 -05:00
co-authored by Claude Fable 5.1
parent 4c793faf51
commit 19e3728fa5
5 changed files with 73 additions and 5 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ pub fn specs() -> Vec<CommandSpec> {
spec!(
"layout.suggest",
"Suggest auto layout",
"{ids?, direction? (horizontal|vertical|grid)} splits each frame's layers into rows or columns by the gaps between them, wraps every band of several layers in a frame without fill that hugs it and does the same inside, so the layers keep their place where the gaps are even; the frame keeps its size, and the result carries `warnings` for gaps that differ or layers that overlap. `direction` sets the top level's direction (nested frames follow the gaps); grid lays the layers out in one grid. A group is converted to a frame and several layers are wrapped in one, as Add auto layout does",
"{ids?, direction? (horizontal|vertical|grid)} splits each frame's layers into rows or columns by the gaps between them, wraps every band of several layers in a frame without fill that hugs it and does the same inside, so the layers keep their place where the gaps are even and the bands start at the same offset across the flow; the frame keeps its size, and the result carries `warnings` for gaps that differ, bands that start at different offsets (they line up at the smallest and some move) and layers that overlap. Instances and the layers inside them are refused. `direction` sets the top level's direction (nested frames follow the gaps); grid lays the layers out in one grid. A group is converted to a frame and several layers are wrapped in one, as Add auto layout does",
true,
suggest::layout_suggest
),