Skip to content

fix(layout): measure intrinsic row and text sizes with resolved child widths - #137

Merged
DavidWilliamBalbino merged 10 commits into
mainfrom
fix/row-height-flex-children
Sep 22, 2026
Merged

DavidWilliamBalbino merged 10 commits into
mainfrom
fix/row-height-flex-children

Conversation

@DavidWilliamBalbino

Copy link
Copy Markdown
Contributor

Problem

Since the variable-font measurement work, a Row whose children are flexible controls (flex-grow: 1; min-width: 0) holding an icon and a label — e.g. a quick-action bar of Pressables — is laid out with a collapsed cross size (a 7 dp tall row whose children overflow and get clipped), and a fixed 48×48 Pressable beside a text column in a space-between row can disappear entirely. Linkinpay's Home renders correctly with the 1.0.13 engine and breaks with 1.0.26/1.0.28.

Change

Cherry-picks the ordered engine-only layout fixes from the local fix/intrinsic-text-cross-width line (author: davidbalbino), which are self-contained in crates/pam-native-engine/src/layout.rs:

  • measure intrinsic text height at the child's cross-axis width
  • resolve intrinsic percentage widths only at the containing block
  • use consistent platform metrics for text wrapping
  • measure uppercase fallback glyphs without clipping short labels
  • measure row height with resolved flex child widths

Engine suite: 75 tests pass. Verified on an API 36 emulator with the Linkinpay Home: header account button and the quick-action row regain their full frames.

🤖 Generated with Claude Code

@DavidWilliamBalbino
DavidWilliamBalbino merged commit 15cf574 into main Sep 22, 2026
6 checks passed
@DavidWilliamBalbino
DavidWilliamBalbino deleted the fix/row-height-flex-children branch September 22, 2026 21: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