Repository navigation
Conversation
huntie
marked this pull request as ready for review
November 4, 2026 13:50
Collaborator
Author
|
@huntie-bot Once this lands, pick request it to both 88 and 89. |
javache
reviewed
Nov 4, 2026
Comment on lines
+66
to
+73
| const {left, right} = event.nativeEvent.insets; | ||
| // Insets are physical edges. Logical edges resolve by layout direction | ||
| // alone, which keeps clear of the RTL left/right swap. | ||
| const {isRTL} = I18nManager.getConstants(); | ||
| setSafeAreaPadding({ | ||
| paddingStart: isRTL ? right : left, | ||
| paddingEnd: isRTL ? left : right, | ||
| }); |
Contributor
There was a problem hiding this comment.
Can't we use paddingLeft and paddingRight here to avoid the manual RTL logic?
Collaborator
0.88 doesn't have |
Collaborator
Author
|
@robhogan Gah, yeah you're right. @huntie-bot Amend: Pick this to only 0.89 please. |
This branch has not been deployed
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.
Summary
The LogBox inspector applies the safe area to its header and footer buttons only, so the error message, code frames and stacks run under a side inset, such as the iPhone Duo's status column or the notch in landscape. This affects the "Failed to compile" screen, which cannot be dismissed, and the dismissable inspector alike.
Changes
experimental_onSafeAreaInsetsChange, and apply the left and right insets as padding to the message header and to the content inside the body'sScrollView, so backgrounds stay edge to edge.paddingStartandpaddingEndbyisRTL, so the RTL left/right swap doesn't move them.This adds no
SafeAreaViewuse, ahead of its removal.Changelog:
[General][Fixed] - LogBox: Keep the inspector's message, code frames and stacks clear of horizontal safe area insets
Test Plan
✅ Passes, with no snapshot changes.
RNTester on the iPhone Duo simulator (iOS 27.1 runtime, Xcode 27.2), folded display, where the status column is a right inset. The syntax error is an unresolvable import added while the app runs, delivered by Fast Refresh; the render error is a
throwinRNTesterApp.✅ The message and code frame wrap before the status column; the header and message backgrounds still reach the edge.
✅ The dismissable inspector gets the same inset; the header and Dismiss, Minimize and Copy buttons are unchanged.
✅ With the message inside the
ScrollView, it and the component stack keep the inset while scrolling.✅ With no side insets, the layout is unchanged.
ℹ️ Not run locally: the Fantom LogBox snapshot tests (
yarn fantom), left to CI.