Repository navigation
Conversation
|
@huntie-bot Once this lands, pick request it to both 88 and 89. |
| 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, | ||
| }); |
There was a problem hiding this comment.
Can't we use paddingLeft and paddingRight here to avoid the manual RTL logic?
There was a problem hiding this comment.
Tested this on the iPhone Duo simulator in RTL, I think the manual RTL logic is needed regardless (for as long as doLeftAndRightSwapInRTL exists).
| RTL | Current (paddingStart/End + isRTL) |
paddingLeft/paddingRight |
|---|---|---|
doLeftAndRightSwapInRTL: true (default) |
![]() |
![]() |
doLeftAndRightSwapInRTL: false |
![]() |
![]() |
This mapping also holds with doLeftAndRightSwapInRTL: false, since paddingStart/End resolve by layout direction alone (verified on device), so I'll keep it as is.
I guess Left/Right might be a semantic improvement, but I don't think it reduces the logic, unless you had something else in mind?
0.88 doesn't have |
|
@robhogan Gah, yeah you're right. @huntie-bot Amend: Pick this to only 0.89 please. |
## Summary: react#59797 added `experimental_onSafeAreaInsetsChange` to the root `logbox_inspector` view, and react#59893 refreshed the LogBox snapshots without that change, so both landed but the committed `LogBoxInspector` baseline is missing the prop. The two inspector snapshot tests fail in Fantom CI mode, which no longer rewrites mismatched baselines (react#59895). Regenerate the two affected snapshots; the only change is the added prop on the root view. ## Changelog: [Internal] ## Test Plan: - `CI=true yarn fantom packages/react-native/Libraries/LogBox`: 2 snapshot failures before; 90/90 tests and 54/54 snapshots pass after, on two consecutive runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…59911) * Force native EventTarget event dispatching on for the React renderer ## Summary: #59896 removed `enableNativeEventTargetEventDispatching` from `ReactNativeFeatureFlags`, but the vendored Fabric renderer still reads it through `react-native/react-private-interface` to choose between `dispatchNativeEvent` and the legacy plugin-based dispatch. With the getter gone, the renderer saw `undefined`, treated the flag as off, and fell back to the legacy path, so listeners registered with `addEventListener` were never called. The `ReactNativeFeatureFlags` getter in the private interface now returns the real flags plus `enableNativeEventTargetEventDispatching: () => true`, so only the renderer sees it. This can be removed once the renderer is synced from a React build that no longer reads the flag. ## Changelog: [Internal] ## Test Plan: - `yarn fantom packages/react-native/src/private/renderer/core/__tests__/EventTargetDispatching-itest.js`: 16 failures before, 78 passed / 20 skipped after. - `yarn fantom packages/react-native/src/private/webapis/dom packages/react-native/src/private/renderer`: 513 passed, 26 skipped. - `yarn eslint --max-warnings 0` and `yarn prettier --check` on both changed files pass. - `yarn flow-check` reports only 2 unrelated parse errors from local git ref logs under `.git/logs/refs/remotes/` whose names end in `.json`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) * Fix build_js_types: move abortSignal's required param first Summary: #59896 made `ReactNativeElement` unconditionally extend `EventTarget`, which imports the `AbortSignal` type, pulling `AbortSignal.d.ts` into the generated types checked by `yarn test-generated-typescript`. The internal `abortSignal(reason = ..., signal)` helper declares a defaulted parameter before a required one, which flow-api-translator emits as `abortSignal(reason?: unknown | void, signal: AbortSignal)` and tsc rejects with TS1016. Reorder the parameters to `abortSignal(signal, reason = ...)` and update both internal callers. The public API snapshot is unchanged. Changelog: [Internal] Test Plan: - `yarn build-types --skip-snapshot && yarn test-generated-typescript`: fails with TS1016 before, passes after - `yarn build-types --validate`: API snapshot is up to date - `yarn eslint --max-warnings 0 packages/react-native/src/private/webapis/dom/abort-api/` * Update LogBoxInspector snapshots for the safe area insets listener ## Summary: #59797 added `experimental_onSafeAreaInsetsChange` to the root `logbox_inspector` view, and #59893 refreshed the LogBox snapshots without that change, so both landed but the committed `LogBoxInspector` baseline is missing the prop. The two inspector snapshot tests fail in Fantom CI mode, which no longer rewrites mismatched baselines (#59895). Regenerate the two affected snapshots; the only change is the added prop on the root view. ## Changelog: [Internal] ## Test Plan: - `CI=true yarn fantom packages/react-native/Libraries/LogBox`: 2 snapshot failures before; 90/90 tests and 54/54 snapshots pass after, on two consecutive runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)




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.