Skip to content

fix(ui): tiles in a row share one height, and never get too narrow - #450

Merged
joszz merged 1 commit into
mainfrom
fix/tile-row-height
Oct 11, 2026
Merged

joszz merged 1 commit into
mainfrom
fix/tile-row-height

Conversation

@joszz

@joszz joszz commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Since tile text wraps instead of being cut off (#447), the dashboard tiles no longer lined up: a tile with a longer label or value grew taller than the others in its row.

Same height per row

The grid already stretched each row to its tallest tile. But on the dashboard and statistics, each tile sits inside a wrapper (for the info button, and in edit mode the draggable slot), and the card inside never filled it. The height is now passed down through those wrappers, so every tile in a row has the same height, in edit mode too.

Tiles never get too narrow

The fixed column counts (4, 6, 8 and 12 beside the sidebar, 3 on tablets) made tiles as narrow as 173px. At that width, values like "71% · Active" and "Off · 21.0 °C" broke over two lines and made their whole row taller. The grid now fits as many tiles as it can at 13rem or wider:

Width Before After
820 (tablet) 3 columns 2 columns
1024 4 3
1440 6 5
1920 8 7
2560 12 10

Phones keep two columns. The 1440/1920/2500 breakpoints for the grid are gone.

Test plan

  • Measured in Playwright on the dashboard and statistics at 390, 700, 768, 820, 900, 1000, 1024, 1440 and 2560 px, for an EV and a hybrid: every row's tiles are the same height, in edit mode too. From 700px up every row is 58 px with no value on two lines. On a 390 px phone, rows are 59 or 74 px, depending on whether a label takes two lines.
  • pnpm exec vitest run (860 tests) and stylelint pass.

🤖 Generated with Claude Code

Since tile text wraps instead of being cut off (#447), a tile with a
longer label or value grew taller than its neighbours. The grid did
stretch each row, but on the dashboard and statistics the grid item is
a wrapper (the info button's, or the edit mode slot), and the card
inside never filled it. The height is now passed down through those
wrappers, so every tile in a row is the same height, in edit mode too.

The fixed column counts (4, 6, 8 and 12 beside the sidebar, 3 on
tablets) made tiles as narrow as 173px, where readings such as
"71% · Active" broke over two lines and made their whole row taller.
The grid now fits as many tiles as it can at 13rem or wider, so from
700px up every row is a single 58px line. Phones keep two columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joszz
joszz merged commit f8e46dd into main Oct 11, 2026
24 checks passed
@joszz
joszz deleted the fix/tile-row-height branch October 11, 2026 07:37
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