Repository navigation
Measure and report embedded content height on Android - #777
Merged
Merged
Conversation
Hosts the embedded view in a scroll view while self sizing so it measures against an unconstrained height, and reports the measured height through onSizeChange on every layout pass. Also sets parentHeightProvider, which the wrapper never set before, so percentage-sized content has a reference to resolve against. It is set only while self sizing; fixed sizing states no parent so percentages resolve against the box React Native assigned. Content going away is detected through the hierarchy change listener rather than a measured zero: the SDK view holds the rendered content as its children, so an empty one means nothing is pending. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
crow
approved these changes
Oct 14, 2026
jyaganeh
approved these changes
Oct 15, 2026
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.
What do these changes do?
Measure the embedded content on Android and report its height through
onSizeChange. While sizing to content the view is hosted in a scroll view soit measures against an unconstrained height.
This also sets
parentHeightProvider, which the React Native wrapper neverset, so percentage-sized content has a height to resolve against.
Why are these changes necessary?
Nothing on Android measured the rendered scene, so an app had no way to find
out how tall the content wanted to be. Percentage-sized content also had no
parent height at all, because
parentHeightProviderwas never set.How did you verify these changes?
Ran the example app on an emulator against a Scene that renders at its natural
height. The view sizes itself to the content, and dismissing the content
collapses it rather than leaving a gap.
Anything else a reviewer should know?
Stacked on #775 — review that one first.
🤖 Generated with Claude Code