Skip to content

Apply safe area insets RTL-aware in RNTester and helloworld (#59645) - #59645

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
Abbondanzo:export-D128337176
Nov 30, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
Abbondanzo:export-D128337176

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

RNTester's platform test results view and the helloworld app pad themselves from experimental_onSafeAreaInsetsChange, mapping insets.left/insets.right straight to paddingLeft/paddingRight. Insets are physical edges, but Yoga treats paddingLeft/paddingRight as start/end when swapLeftAndRightInRTL is on, so in RTL a right-edge cutout was left unpadded while the left edge got its padding. Both callers now swap the left and right insets in that case, as the internal SafeAreaView already does.

Changelog:
[Internal]

Reviewed By: andrewdacenko

Differential Revision: D128337176

@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 29, 2026
@meta-codesync

meta-codesync Bot commented Oct 29, 2026

Copy link
Copy Markdown

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

Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Oct 29, 2026
)

Summary:
Pull Request resolved: react#59645

RNTester's platform test results view and the helloworld app pad themselves from `experimental_onSafeAreaInsetsChange`, mapping `insets.left`/`insets.right` straight to `paddingLeft`/`paddingRight`. Insets are physical edges, but Yoga treats `paddingLeft`/`paddingRight` as start/end when `swapLeftAndRightInRTL` is on, so in RTL a right-edge cutout was left unpadded while the left edge got its padding. Both callers now swap the left and right insets in that case, as the internal `SafeAreaView` already does.

Also updates the LogBox inspector, inspector footer and inspector header Fantom snapshots for the internal `SafeAreaView`'s wrapper view.

Changelog:
[Internal]

Reviewed By: andrewdacenko

Differential Revision: D128337176
@meta-codesync meta-codesync Bot changed the title Apply safe area insets RTL-aware in RNTester and helloworld Apply safe area insets RTL-aware in RNTester and helloworld (#59645) Oct 29, 2026
)

Summary:
Pull Request resolved: react#59645

RNTester's platform test results view and the helloworld app pad themselves from `experimental_onSafeAreaInsetsChange`, mapping `insets.left`/`insets.right` straight to `paddingLeft`/`paddingRight`. Insets are physical edges, but Yoga treats `paddingLeft`/`paddingRight` as start/end when `swapLeftAndRightInRTL` is on, so in RTL a right-edge cutout was left unpadded while the left edge got its padding. Both callers now swap the left and right insets in that case, as the internal `SafeAreaView` already does.

Changelog:
[Internal]

Reviewed By: andrewdacenko

Differential Revision: D128337176

@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.

@meta-codesync
meta-codesync Bot merged commit 8067726 into react:main Nov 30, 2026
88 of 91 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @Abbondanzo in 8067726

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 30, 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