fix(ios): liquid glass flexbox#11134
Open
VeinDevTtv wants to merge 7 commits intoNativeScript:mainfrom
Open
Conversation
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx test apps-automated -c=android |
❌ Failed | 3m 47s | View ↗ |
nx run-many --target=test --configuration=ci --... |
✅ Succeeded | 3s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-03-24 16:29:05 UTC
- fall back to plain UIVisualEffectView when glass APIs are unavailable - guard glass effect runtime access behind capability checks - request layout for iOS 18+ label text changes even for fixed-size labels - add automated regression coverage for liquid glass effect updates
CatchABus
reviewed
Mar 11, 2026
Update the iOS LiquidGlass FlexboxLayout test to compare the fixed 300 DIP container height using device pixels. The layout helper reports pixel sizes, so 300 DIP correctly renders as 900 px on a 3x simulator; this fixes an outdated test expectation rather than a flexbox regression.
NathanWalker
requested changes
Mar 11, 2026
Remove the unrelated Label layout invalidation change and simplify glass support back to the SDK gate requested in PR review. Also drop runtime glass style global lookups and restore temporary measure-state overrides in finally blocks so the flexbox fix remains scoped and safe.
Contributor
|
Thank you for the adjustments @VeinDevTtv - one last small thing; is it possible to add a quick FlexboxLayout example in https://github.com/NativeScript/NativeScript/blob/main/apps/toolbox/src/pages/glass-effects.xml so it's easily seen in toolbox for this case now and in future? |
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.

PR Checklist
What is the current behavior?
Currently on iOS, placing a
LiquidGlassorLiquidGlassContainercomponent inside aFlexboxLayoutcompletely breaks the layout (children are measured incorrectly and positioned at the wrong coordinates). This is because LiquidGlass overrides_addViewToNativeVisualTreeto use a nested_contentHostview, which mismatches FlexboxLayout's standard measurement and layout paradigms.What is the new behavior?
Measurement fix: Overrode
onMeasurein bothLiquidGlassandLiquidGlassContainerto temporarily zero out padding/border properties before delegating tosuper.onMeasure(). This preventsGridLayout/AbsoluteLayoutfrom double-subtracting padding thatFlexboxLayoutalready removed from the child measure spec.Layout fix: Overrode
onLayoutin both classes to callsuper.onLayout(0, 0, right - left, bottom - top). SinceFlexboxLayoutpositions the rootUIVisualEffectViewusing absolute coordinates, the internal NativeScript layout engine needs normalized(0, 0, width, height)bounds to correctly position children within the local_contentHostcoordinate space.Fixes #11099.