Skip to content

fix(layout): hug a group at max-content so it fits its full content (0.0.45)#47

Merged
gyng merged 1 commit into
mainfrom
fix/group-hug-maxcontent
Jun 14, 2026
Merged

fix(layout): hug a group at max-content so it fits its full content (0.0.45)#47
gyng merged 1 commit into
mainfrom
fix/group-hug-maxcontent

Conversation

@gyng

@gyng gyng commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Problem

After v0.0.44, the Network widget (a hugged group) still clipped its rate-text row on the live overlay — with empty space below it (confirmed by a screen capture of the running v0.0.44 instance).

Root cause: v0.0.44 floored content-basis groups at min-content, but the rate-text row is a content row whose fr text leaves have min-height: 0, so it collapses out of min-content. The group landed ~one row (~16px) short and clipped it.

Fix

  • flowStyle.ts — a content-basis group now floors at max-content (its full natural content, rate row included). A group has well-defined max-content (real children); a fill meter keeps min-content (max-content is ill-defined for a width/height:100% meter and can collapse to 0).
  • e2e/groupHug.spec.ts — verifies in Chromium that min-height: max-content sizes a group to its full content (rate row stays inside the box).

Verification

  • type-check, lint, 1318 unit tests (flowStyle group test updated), build — green.
  • Real-browser e2e: 33 passed (incl. the new group-hug test).
  • Honest caveat: I could not reproduce the exact live-overlay min-content shortfall in a synthetic test (it's specific to the nested fr/grid layout). max-content is full-content sizing and is always ≥ the prior floor, so it can only help — but the live fix needs an install-and-eyeball to confirm.

🤖 Generated with Claude Code

…0.0.45)

The v0.0.44 group-hug floor used min-content, but a collapsing sub-row (the Network
rate-text row — its fr text leaves have min-height:0) drops out of min-content, so a
hugged Network group landed ~one row short and clipped the rate row, even with empty
space below it (confirmed on a live v0.0.44 overlay via a screen capture).

- flowStyle.ts: a content-basis GROUP now floors at max-content (its full natural content,
  rate row included) instead of min-content. A group has well-defined max-content (real
  children); a FILL meter keeps min-content (max-content is ill-defined for a
  width/height:100% meter, it can collapse to 0).
- e2e/groupHug.spec.ts: verifies in Chromium that min-height:max-content sizes a group to
  its full content (the rate row stays inside the box).

Verified: type-check, lint, 1318 unit tests, build, real-browser e2e (33 passed). NOTE: I
could not reproduce the exact live-overlay min-content shortfall in a synthetic test (it's
specific to the nested fr/grid layout), so the live fix needs an install-and-eyeball — but
max-content is full-content sizing and is always >= the prior floor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gyng gyng merged commit f4fd99a into main Jun 14, 2026
3 checks passed
@gyng gyng deleted the fix/group-hug-maxcontent branch June 14, 2026 22:49
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