Skip to content

Measure and report embedded content height on Android - #777

Merged
oristanovic merged 1 commit into
mainfrom
feat/embedded-self-sizing-android
Oct 15, 2026
Merged

oristanovic merged 1 commit into
mainfrom
feat/embedded-self-sizing-android

Conversation

@oristanovic

@oristanovic oristanovic commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 so
it measures against an unconstrained height.

This also sets parentHeightProvider, which the React Native wrapper never
set, 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 parentHeightProvider was 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

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>
@oristanovic
oristanovic requested a review from a team as a code owner October 13, 2026 12:47
Base automatically changed from feat/embedded-size-spec to main October 15, 2026 07:59
@oristanovic
oristanovic merged commit 8f0623c into main Oct 15, 2026
1 check passed
@oristanovic
oristanovic deleted the feat/embedded-self-sizing-android branch October 15, 2026 08:00
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.

3 participants