Skip to content

fix(demo): pack the dashboard board, which was mostly empty space - #9

Merged
MeAkib merged 1 commit into
mainfrom
fix/pack-dashboard-board
Sep 20, 2026
Merged

MeAkib merged 1 commit into
mainfrom
fix/pack-dashboard-board

Conversation

@MeAkib

@MeAkib MeAkib commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Two separate kinds of gap, both measured rather than eyeballed.

Between tiles. A tile spanning two columns cannot start until both are free, so one arriving while the columns are uneven strands the shorter column. The board opened with a 296px void under the second KPI for exactly this reason. Worse, it had eleven wide tiles to nine narrow ones, so the third column could never keep up and finished 900px short of its neighbours.

Inside tiles. .widget ul is flex: 1, so a list stretches to whatever height the author picked. Traffic sources reserved 296px for 168px of rows and left the rest blank. List heights now come from the row count — 48 + 28n, measured against the rendered tile rather than guessed.

The fix is eight wide tiles to twelve narrow, ordered so the wide ones land while the columns are level. Found by writing a simulator of the library's own shortest-column placement and searching orderings against it, then confirming the result in a browser — the simulator and the rendered board agree on height to the pixel.

3 columns height 2416 -> 1688, interior holes 676px -> 4px
2 columns height 3580 -> 2552, trailing gap 20px
4 columns height 2000 -> 1264, every column finishes level

185 tests pass, no console errors, no failed requests.

What does this change?

How to see it

Checks

  • npm test passes
  • npm run format run on the files I touched
  • Added a test, if this fixes a bug — one that fails before the change and passes after
  • npm run verify:compat, if I changed anything public (builds a real app on Angular 17–22)

Two separate kinds of gap, both measured rather than eyeballed.

Between tiles. A tile spanning two columns cannot start until both are free, so
one arriving while the columns are uneven strands the shorter column. The board
opened with a 296px void under the second KPI for exactly this reason. Worse,
it had eleven wide tiles to nine narrow ones, so the third column could never
keep up and finished 900px short of its neighbours.

Inside tiles. `.widget ul` is `flex: 1`, so a list stretches to whatever height
the author picked. Traffic sources reserved 296px for 168px of rows and left
the rest blank. List heights now come from the row count — 48 + 28n, measured
against the rendered tile rather than guessed.

The fix is eight wide tiles to twelve narrow, ordered so the wide ones land
while the columns are level. Found by writing a simulator of the library's own
shortest-column placement and searching orderings against it, then confirming
the result in a browser — the simulator and the rendered board agree on height
to the pixel.

  3 columns   height 2416 -> 1688, interior holes 676px -> 4px
  2 columns   height 3580 -> 2552, trailing gap 20px
  4 columns   height 2000 -> 1264, every column finishes level

185 tests pass, no console errors, no failed requests.
@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
masonry-angular Ready Ready Preview Sep 20, 2026 4:29pm UTC
masonry-angular-examples Ready Ready Preview Sep 20, 2026 4:29pm UTC

@MeAkib
MeAkib merged commit 6e59e65 into main Sep 20, 2026
8 checks passed

This branch was successfully deployed

2 active deployments
Preview – masonry-angular-examples 6bfad508 Deployed Sep 20, 2026 by vercel[bot]
Preview – masonry-angular 6bfad508 Deployed Sep 20, 2026 by vercel[bot]
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