Skip to content

Add a Fantom control for native root constraints (#60156) - #60156

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D133247484
Nov 23, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
rubennorte:export-D133247484

Conversation

@rubennorte

@rubennorte rubennorte commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary:

Context

Fantom can create roots with a chosen viewport size, but its existing native TesterAppDelegate::updateSurfaceConstraints method was not exposed to JavaScript tests. Tests of native host resizing need to change root constraints without another React render or flushing pending JS work.

Changes

  • Add a thin root.updateSurfaceConstraints(width, height) binding to the existing tester method, forwarding the root’s device pixel ratio.
  • Add root-view tests for growing and shrinking native constraints, percentage-sized descendants, stable host refs, deferred JS work, and attempts to resize a destroyed root.
  • Document the control. Do not add context tracking or a queue-validation API.

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D133247484

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 19, 2026
@meta-codesync

meta-codesync Bot commented Nov 19, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D133247484.

@andrewdacenko andrewdacenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Visual regression

No visual differences at 87d709f7baac.

Summary:

## Context
Fantom can create roots with a chosen viewport size, but its existing native `TesterAppDelegate::updateSurfaceConstraints` method was not exposed to JavaScript tests. Tests of native host resizing need to change root constraints without another React render or flushing pending JS work.

## Changes
- Add a thin `root.updateSurfaceConstraints(width, height)` binding to the existing tester method, forwarding the root’s device pixel ratio.
- Add root-view tests for growing and shrinking native constraints, percentage-sized descendants, stable host refs, deferred JS work, and attempts to resize a destroyed root.
- Document the control. Do not add context tracking or a queue-validation API.

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D133247484
@meta-codesync meta-codesync Bot changed the title Add a Fantom control for native root constraints Add a Fantom control for native root constraints (#60156) Nov 23, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Nov 23, 2026
Summary:

## Context
Fantom can create roots with a chosen viewport size, but its existing native `TesterAppDelegate::updateSurfaceConstraints` method was not exposed to JavaScript tests. Tests of native host resizing need to change root constraints without another React render or flushing pending JS work.

## Changes
- Add a thin `root.updateSurfaceConstraints(width, height)` binding to the existing tester method, forwarding the root’s device pixel ratio.
- Add root-view tests for growing and shrinking native constraints, percentage-sized descendants, stable host refs, deferred JS work, and attempts to resize a destroyed root.
- Document the control. Do not add context tracking or a queue-validation API.

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D133247484
rubennorte added a commit to rubennorte/react-native that referenced this pull request Nov 23, 2026
Summary:

## Context
Fantom can create roots with a chosen viewport size, but its existing native `TesterAppDelegate::updateSurfaceConstraints` method was not exposed to JavaScript tests. Tests of native host resizing need to change root constraints without another React render or flushing pending JS work.

## Changes
- Add a thin `root.updateSurfaceConstraints(width, height)` binding to the existing tester method, forwarding the root’s device pixel ratio.
- Add root-view tests for growing and shrinking native constraints, percentage-sized descendants, stable host refs, deferred JS work, and attempts to resize a destroyed root.
- Document the control. Do not add context tracking or a queue-validation API.

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D133247484
@rubennorte
rubennorte force-pushed the export-D133247484 branch 2 times, most recently from b4a103d to 87d709f Compare November 23, 2026 15:05
@meta-codesync
meta-codesync Bot merged commit a3a48ea into react:main Nov 23, 2026
123 of 138 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in a3a48ea

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants