Skip to content

Grid reflow: ordered-list layout with cell-size target (ADR-0010, closes #92) - #98

Merged
jonocodes merged 1 commit into
mainfrom
feat/grid-reflow
Jul 31, 2026
Merged

Grid reflow: ordered-list layout with cell-size target (ADR-0010, closes #92)#98
jonocodes merged 1 commit into
mainfrom
feat/grid-reflow

Conversation

@jonocodes

Copy link
Copy Markdown
Owner

What

Implements ADR-0010 — replaces the old coordinate model with an ordered-list reflow model. Widgets pack in list order, left-to-right, wrapping down against the viewport width.

Schema changes:

  • Remove from Widget (both TS + Python)
  • Add span (default ), , , (shrink-to-fit default)

Client:

  • New module — pure geometry, unit-tested
  • Single "Cell size" slider (64–240, default 100px) replaces the min/max band
  • Downward-scanning even-row preference: 8 widgets → 4×2, 7 → 4+3, 6 → 3×2
  • ButtonGrid, Settings, Gallery, Ladle stories all updated
  • Gallery has a slider that pipes to iframe query params

Layouts: All ~12 YAMLs migrated. Musicca piano uses gap markers.

Tests: 154 client + 503 daemon pass. New Python schema tests for blank/size/overflow.

Follow-up: #97 for reflow algorithm fine-tuning.

Files

58 files changed, +941/−536

Remove grid coordinates — widgets are an ordered list that reflows against
viewport width. A single  client preference (default 100px) replaces
the min/max band. Shrink-to-fit is the default overflow so no partial rows.

Schema: drop ; add  span, ,
,  field. Move transpose out of orientation.ts.

Reflow: downward-scanning even-row preference (8->4x2, 7->4+3, 6->3x2)
with dynamic w/3 cap.  is pure-geometry, unit-tested.

Layouts: all ~12 YAMLs migrated to ordered-list format. Musicca piano now
uses  gap markers.

Closes #92. Follow-up: #97 (reflow fine-tuning).
@jonocodes
jonocodes merged commit 5614953 into main Jul 31, 2026
2 checks passed
@jonocodes
jonocodes deleted the feat/grid-reflow branch August 4, 2026 03:36
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