Skip to content

fix(ios): honor fixed-height boxes - #104

Merged
GenericJam merged 1 commit into
masterfrom
fix/ios-fixed-height-box
Aug 30, 2026
Merged

fix(ios): honor fixed-height boxes#104
GenericJam merged 1 commit into
masterfrom
fix/ios-fixed-height-box

Conversation

@GenericJam

Copy link
Copy Markdown
Owner

Summary

  • apply fixedHeight when a MobBox has no fixed width
  • preserve the existing full-width behavior for width-less boxes
  • add a focused native source-contract regression

Verification

  • mix format
  • mix compile --warnings-as-errors
  • mix credo --strict
  • mix test (1,259 passed, 38 excluded)
  • native iOS simulator build/install on pool-ios-3
  • Mob.Test.frame/2: height-120 box {0.0, 62.0, 402.0, 120.0}; following height-40 reference {0.0, 182.0, 402.0, 40.0}

@GenericJam

Copy link
Copy Markdown
OwnerAuthor

Adversarially reviewed and device-verified. Approve.

Device matrix on a pool sim (element_frames, points): height-only 120 → {402.0 × 120.0} exact with full parent width per contract — bug fixed; width-only, both-dims, and neither all unchanged; weighted box with fixed height → weight wins (269 = 538/2), matching Android's Compose semantics where weight's exact constraints coerce height(). Paint verified by pixel sampling: the height-only box's full 402×120 frame samples the exact requested color at dominant_share 1.0 (434,160 px @3x) — background/border/tap cover the expanded frame because the new .frame sits before padding/background/gestures in the chain, same ordering as Android. Gates on the PR+master merge (clean merge-tree): 1281 tests / 0 failures, format, credo --strict, warnings-as-errors.

Non-blocking: (1) no CHANGELOG entry — I'll include one in the release cut; (2) the new source-contract test asserts an exact 5-line whitespace-sensitive block — the #98 precedent is token-level =~ assertions plus an ordering check, worth loosening next touch; (3) precedence corner: height + fill_height together now lets height win on iOS while Android's fillMaxHeight().height(h) lets fill win — iOS is now internally consistent, but the contradictory-props corner diverges cross-platform; deserves a comment or docs note. Also discovered during review (filing separately): iOS Column/Row still ignore fixed width/height entirely — the same bug class this fixes for Box.

Merging.

@GenericJam
GenericJam merged commit e081e91 into masterAug 30, 2026
4 checks passed
Sign up for freeto 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

@GenericJam