fix(layout): hug a group at max-content so it fits its full content (0.0.45)#47
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 whosefrtext leaves havemin-height: 0, so it collapses out ofmin-content. The group landed ~one row (~16px) short and clipped it.Fix
flowStyle.ts— a content-basis group now floors atmax-content(its full natural content, rate row included). A group has well-definedmax-content(real children); a fill meter keepsmin-content(max-contentis ill-defined for awidth/height:100%meter and can collapse to 0).e2e/groupHug.spec.ts— verifies in Chromium thatmin-height: max-contentsizes a group to its full content (rate row stays inside the box).Verification
min-contentshortfall in a synthetic test (it's specific to the nested fr/grid layout).max-contentis 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