Repository navigation
fix(view): bridge safe-area inset changes on macOS - #3183
Jason Morse (JasonVMo) wants to merge 2 commits into
Conversation
Supply the UIKit callback used by Fabric subclasses such as react-native-safe-area-context 5.11.1. AppKit has safeAreaInsets but no safeAreaInsetsDidChange selector. Notify subclasses after actual inset changes during attachment/layout, recording the value before dispatch to avoid duplicate notifications. Preserve UIKit behavior on iOS. Register and extend the existing macOS XCTest source; its baseline caller fails to compile, while both callback regressions pass with the shim. Keep this compatibility repair separate from native-props synchronization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 33ea5c72-8bbd-448d-aa21-c9b99dd03c96
The generated AppDelegate has immutable stored properties, so Swift definite initialization requires assigning them before NSObject.init. Keep them immutable and move only the superclass call. Actual compilation of the exact extracted class reproduces all three baseline errors and passes after the fix; typecheck alone does not run this analysis. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 33ea5c72-8bbd-448d-aa21-c9b99dd03c96
|
CI follow-up: after the separate safe-area blocker was fixed, the 0.83 The template's two immutable stored properties were assigned after The exact template class, compiled with lightweight dependency interfaces, Main prerequisite commit: |
Summary:
The generated-app integration jobs on both stable branches currently fail in
react-native-safe-area-context@5.11.1:AppKit exposes
safeAreaInsetsbut not UIKit's overridable callback.Supply that API in the fork's existing
RCTUIViewcompatibility class anddeliver notifications when its effective insets actually change during
attachment/layout. Record the new value before invoking subclasses, and do
not send duplicate notifications for unchanged layouts. UIKit/iOS behavior
is untouched.
The branch adapters use their existing UIKit implementation locations:
the modular RCTUIKit files on main/0.83, and the monolithic implementation
on 0.81. They register and extend the existing macOS XCTest source.
Release metadata follows the target branch: none on main, Nx on 0.81, and
a Changeset on 0.83.
This is deliberately separate from #3176/#3177/#3178's renderer
synchronization. No FURN input/layout/window-sizing code, dependency pin,
retry, CI workflow, or renderer mutex implementation changes are included.
No equivalent callback was found in the inspected future merge heads or
existing open PRs.
The stable adapters are middle layers above native-host repairs #3180
(0.81) and #3179 (0.83). Main reuses existing host repair #3095 rather than
opening a duplicate.
Test Plan:
Red/green: with the regression source actually registered in the macOS
Sources phase, the baseline fails compiling its superclass callback, matching
the integration failure. With the shim, both native callback tests pass.
The early zero-test invocation was not counted as coverage; source membership
was fixed before the red/green run.
callback tests plus six existing Paper layout and three gzip regressions.
plutil -lint, andgit diff --checkpassed for all three adapters.
NX_DAEMON=false yarn nx release plan:check --base=0.81/user/jasonvmo/native-test-hostpassed for the 0.81 middle layer.
Exact modern native command from its isolated qualification root
(
NATIVE_PROPS_EVIDENCEdenotes the local artifact directory):Exact legacy-port command:
Qualification uses local-only single-run profiles, without the pre-existing
retry default; no test-plan changes are committed. These ordinary callback
tests are not sanitizer/race-freedom evidence. The separately instrumented
native-props comparisons belong to the renderer PRs.
Not run here: the entire native unit suite, a separate main callback execution,
iOS/device runtime, real notched-screen transitions, or FURN smokes. Hosted
CI will validate the generated-app failure path; no PR is merged.