Skip to content

Give a card's body the line the badge row was taking - #111

Merged
vmillet-dev merged 1 commit into
mainfrom
feat/a-card-gives-its-body-more-room
Sep 14, 2026
Merged

vmillet-dev merged 1 commit into
mainfrom
feat/a-card-gives-its-body-more-room

Conversation

@vmillet-dev

Copy link
Copy Markdown
Owner

Closes #71.

The language badge owned a row of its own above the title — ~17px plus an 8px
margin out of the 122px a card has, spent before a character of body. Badge,
title and marks (⚡ 📎 📌) now share one line, and SNIPPET_LINES goes from 3
to 4.

Measured, not estimated

Fully-visible body lines per card, same window, same corpus, main against this
branch. A line counts only if its box sits wholly inside the snippet's band.

card main here
Angular signals 1 4
A title so long that not even two lines… 0 3
Short title 1 3
A title long enough to run past one line… 1 3
Welcome to DevBox 0 2
psql connection 1 1
two todo lists (no body) 0 0

Five cards gain two or three lines. None loses any. The cards sitting at 0 on
main are the ones a long unclamped title had eaten whole.

The title now has a budget

It had none: a long one took three lines and ate the body, so two cards side by
side showed different amounts of it for no reason the user had chosen. Clamped at
two lines. That is a visible behaviour change and it is the point of the ticket,
not a slip.

The tick gets a gutter

⚠️ The part the ticket said to design around. .card-check floats at left: 8px
while the card's padding starts at 14px, so it lands on whatever begins the top
line — and it is not a hover-only concern: checked keeps it on with no pointer
at all, which is the state a multiple selection leaves every card in. Unreserved
it sat squarely on the language badge, and on a todo list, which has no badge, it
would have sat on the title.

.card-head reserves 14px for it, permanently rather than only while the tick
shows — the second would shift the title sideways under the pointer.

I looked at all four states the ticket asks for (at rest, hovered, ticked,
ticked-while-hovered) on a card with a title long enough to wrap, and on a todo
list with no badge. Nothing overlaps in any of them. ⚠️ One honest caveat on the
method: a WebDriver pointer move produces no CSS :hover in this WebView, so the
hovered states were captured by forcing on what hover reveals. That shows the
layout faithfully, which is what was at issue, but it is not a real pointer.

.card-pin's margin-left: auto is gone with the row it belonged to — on a
merged line it would have pushed the title instead of the glyphs. The checklist
card's bottom-anchored item layer is untouched.

Checked locally

npm test 961 passing, npm run lint clean, npm run test:e2e 15/15 in 3:52.

🤖 Generated with Claude Code

The language badge owned a row of its own above the title: ~17px plus an
8px margin out of the 122px a card has, spent before a character of body.
Badge, title and marks now share one line.

The title gains the line budget it never had — clamped at two — and the
head reserves a gutter for the selection tick, which floats at left: 8px
and sat on the badge whenever a card was ticked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vmillet-dev
vmillet-dev merged commit b8c047f into main Sep 14, 2026
9 checks passed
@vmillet-dev
vmillet-dev deleted the feat/a-card-gives-its-body-more-room branch September 14, 2026 22:12
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.

A card spends half its height on the header before showing a line of body

1 participant