Skip to content

feat(home): modular tile layout for the home page - #58

Merged
bilbospocketses merged 8 commits into
masterfrom
feat/home-tile-layout
Jun 13, 2026
Merged

feat(home): modular tile layout for the home page#58
bilbospocketses merged 8 commits into
masterfrom
feat/home-tile-layout

Conversation

@bilbospocketses

Copy link
Copy Markdown
Owner

What

Reworks the home page from the equal-height card grid into a modular tile grid: each category card sizes to its own content, and only data-heavy cards (Imaging Tools, Settings) grow to span two tile-units, lining up with the single cards stacked beside them. Also slims the hero into a compact band and left-aligns the card headers.

Why

The old grid stretched every card in a row to match the tallest one, so a one-link card (Android Devices) carried the same dead space as the six-link Imaging card. The tile layout keeps a uniform, aligned look while letting small cards stay small.

How

  • Cards span var(--cm-tile-span) rows of a fixed tile-unit grid. The span is seeded server-side from the link count (close first paint, no flash), then measured-and-snapped to the exact value client-side, so any future card -- including 3- and 4-row ones -- just works.
  • Measure-and-snap follows the app's existing window.controlMenu.* interop convention (the numeric-token resize pattern from sidebar-flyout.js), not ES modules -- theme.js documents why the app avoids those.
  • Responsive: 3 roomy columns on a wide screen, falling back to 2 then 1 as the window narrows (content area widened to 1400px so 3 columns are not cramped).
  • Colours come from the existing theme variables, so it works in light and dark.

Preserves module discovery, the Cameras-hidden-when-empty behaviour, the Settings card, the wizard gate, and pill rendering.

Test plan

  • dotnet test -- 454 pass (adds HomeTileLayout.InitialSpan unit tests plus a bUnit span-seed assertion; existing Home tests stay green).
  • Manual: verified in-browser at 1920px (3 columns, ~438px) and 1500px (2 columns), cards sizing to content (one-link = 1 unit, Imaging/Settings = 2 units), no clipping at any width.

Spec + plan: docs/superpowers/specs/2026-06-12-home-tile-layout-design.md, docs/superpowers/plans/2026-06-12-home-tile-layout.md.

…back to fewer columns when narrow

At max-width 1200px, three tile columns were only ~367px each (cramped) and the layout did not visibly respond to shrinking until quite narrow. Widen .home-container to 1400px and raise the column min-width to 400px so the grid shows roomy 3 columns (~438px) on wide screens and drops to 2 (then 1) as the window narrows. Verified via browser at 1920 (3 cols) and 1500 (2 cols), no clipping.
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