| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
View your CI Pipeline Execution ↗ for commit 7bfbe9f
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at 2026-09-28 18:51:39 UTC |
Sorry, something went wrong.
npm i https://pkg.pr.new/@nativescript/core@11469 npm i https://pkg.pr.new/@nativescript/vite@11469 npm i https://pkg.pr.new/@nativescript/webpack@11469 commit: 7bfbe9f |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Checklist
What is the current behavior?
On iOS, FlexboxLayout.getChildMeasureSpec is called with the child's own padding where the AOSP FlexboxLayout implementation it's ported from passes the parent's padding plus the child's margins:
The mismatch is visible whenever a flex child is re-measured against a fixed parent constraint. Concretely: a ROW child inside a COLUMN flexbox that gets stretched (_stretchViewVertically re-measure) is re-measured with EXACTLY <rowHeight> on the cross axis, and the child-spec computation subtracts the child's own padding — so a control with 10dip vertical padding inside a 37dip row is clamped to 17dip content height and its label collapses.
This shows up as buttons/labels squished to a minimum height inside items-center flex rows — plausibly the root cause behind #5194 (padding ignored inside flexbox-layout) and possibly #4834.
What is the new behavior?
All getChildMeasureSpec call sites in index.ios.ts now consistently subtract the parent's padding and the child's margins, matching the AOSP reference and the two call sites that were already correct (lines 388–389).
Verified on a real app: padded buttons inside stretched rows measure 37dip (correct) instead of 17dip (collapsed).
Android is unaffected — it delegates to org.nativescript.widgets.FlexboxLayout (the real Google Flexbox library).
Testing note
The affected code runs inside the iOS measure pass; packages/core has no flexbox spec today and Vitest mocks the platform globals, so a unit test would need to mock the whole native measure pipeline. I verified the fix by patching the installed package in an app: controls that previously measured 85x17 now measure 85x37 with visible labels. An apps/automated case asserting child height inside an items-center row would cover this going forward — happy to add one if you'd like.