Skip to content

fix(ios): Correct layout validity status during layout changed event#11218

Merged
NathanWalker merged 2 commits into
NativeScript:mainfrom
CatchABus:fix/ios-islayoutvalid
May 17, 2026
Merged

fix(ios): Correct layout validity status during layout changed event#11218
NathanWalker merged 2 commits into
NativeScript:mainfrom
CatchABus:fix/ios-islayoutvalid

Conversation

@CatchABus
Copy link
Copy Markdown
Contributor

@CatchABus CatchABus commented May 17, 2026

PR Checklist

What is the current behavior?

On iOS, the isLayoutValid getter can be true when checked in a layoutChanged event listener.
This causes platform inconsistency and reports a valid layout before computations are over.

What is the new behavior?

Updated the getter to reflect the android approach since the core layout system for iOS is inspired from it and added an automated test to cover the case explained.
This is helpful for plugins to make use of that flag and have identical results for both platforms.
Additionally, causing the flag to be truthy at a later point makes it wait for layoutIfNeeded call, thus making it usable for tests that didn't pass till now.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 17, 2026

View your CI Pipeline Execution ↗ for commit 48befa9

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 4m 6s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-17 19:24:41 UTC

@CatchABus CatchABus marked this pull request as draft May 17, 2026 19:14
@CatchABus CatchABus marked this pull request as ready for review May 17, 2026 19:18
@NathanWalker NathanWalker merged commit 7a3552a into NativeScript:main May 17, 2026
4 checks passed
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.

2 participants