Skip to content

RNTester: reproduce Android edge-to-edge Modal initial height (#59353) - #59358

Closed
litinskii wants to merge 1 commit into
react:mainfrom
litinskii:patch-1
Closed

litinskii wants to merge 1 commit into
react:mainfrom
litinskii:patch-1

Conversation

@litinskii

Copy link
Copy Markdown

Summary:

Reproducer for #59353, in the RNTester Playground format requested by the issue bot. This PR changes only packages/rn-tester/js/examples/Playground/RNTesterPlayground.js; it does not fix Modal or change native code.

On the affected Android edge-to-edge configuration, a fresh core Modal reports a full-size child's initial height excluding system insets, followed by the actual full dialog height. The previously measured Pixel 8 API 35 / RN 0.87.1 setup reports 816 -> 914.2857 dp.

The example opens a plain Modal with both translucent props, animationType=none, and a full-size View. It retains every onLayout height in the UI and logs each layout, so the incorrect first measurement remains observable after the second layout. Closing and opening mounts a fresh Modal. There are no timers, animations, manual remeasurement calls, images, Copilot or external dependencies.

Changelog:

[INTERNAL] [ADDED] - Add an RNTester Playground reproducer for Android edge-to-edge Modal initial layout measurements.

Test Plan:

Static checks completed

  • Formatted/checked this file using Prettier 3.9.4 with the repository's Flow formatting options: passed.
  • Transformed this file using the installed React Native Babel preset: passed.
  • Confirmed the diff contains only RNTesterPlayground.js.

A full RNTester Android build, repository-wide ESLint and Flow checks have not been run in this session. The earlier native A/B results described in #59353 were collected with equivalent core Modal/View probes in an RN 0.87.1 app; they are not presented as a runtime test of this PR on current main.

Manual reproduction

  1. Check out this PR in a React Native checkout and install dependencies with the repository's pinned Yarn. Build codegen once with yarn --cwd packages/react-native-codegen build.
  2. Start Metro from the repository root with yarn start.
  3. Build/install RNTester on Android with edge-to-edge enabled, for example:
    ./gradlew :packages:rn-tester:android:app:installDebug -PreactNativeArchitectures=arm64-v8a -PedgeToEdgeEnabled=true
  4. Launch RNTester on a portrait Android API 35 emulator with three-button navigation and open Playground.
  5. Press Open Modal. Read Every onLayout height in the modal or the Modal onLayout: entries in React Native DevTools Console. Close and reopen to repeat.
  6. On the affected configuration, observe an initial screen-minus-system-insets height followed by the full dialog height (previously 816 -> 914.2857 dp). The expected behavior is that the initial full-size child already matches the actual full modal window; exact numeric heights depend on the device.

Please keep #59353 open: this is the requested reproducer, not the native fix.

Add a minimal Playground reproducer for react#59353. Preserve every onLayout height and disable Modal animation so the initial screen-minus-insets size is observable.
@meta-cla

meta-cla Bot commented Oct 22, 2026

Copy link
Copy Markdown

Hi @litinskii!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla

meta-cla Bot commented Oct 22, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@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 Oct 22, 2026
@meta-cla

meta-cla Bot commented Oct 22, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Oct 22, 2026
@javache javache closed this Oct 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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants