Repository navigation
Conversation
|
@chocky335 is attempting to deploy a commit to the appandflow Team on Vercel. A member of the Team first needs to authorize it. |
floco-af
reviewed
Nov 4, 2026
floco-af
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the PR and the detailed write-up. Automated first-pass review from Floco, the App & Flow bot. A maintainer will take a look too.
What I checked
- Jest on
main: 32 passed, 2 skipped. On this branch: 37 passed, 2 skipped. The 5 new tests (default off, prop reaches the native provider, inheritance, explicitfalseoverride, stays off under a parent that doesn't set it) all pass. tsc --noEmitis clean and prettier is clean. ESLint reports 0 errors. The 3 warnings are the existingreact-native/Libraries/...deep-import warnings and none are in lines this PR adds.- I read the Android (new arch and paper delegate), iOS (Paper and Fabric) and JS changes.
Findings
- The Android design looks right to me.
getInsetsIgnoringVisibilitynever gets the IME type, which would throw. The max with the dispatched insets from #791 is kept. The API 23-29 fallback (stableInset*and cutout) matches what the issue describes.SafeAreaViewpicks the flag up from its provider and refreshes on the provider's pre-draw pass, so toggling the prop at runtime updates both. - The Paper
RNCSafeAreaProviderManagerDelegateandInterfaceare updated by hand. That is correct because they are checked in, not generated. - iOS:
RNCSafeAreaStatusBarTopInsetis only declared and defined forTARGET_OS_IPHONEand returns 0 off iOS (tvOS, visionOS), so those platforms keep the current behaviour. The FabricupdateProps:handling and the reset inprepareForRecyclelook right. - Minor, iOS: the status bar height cache is a function-level
staticarray shared by every window and provider, and only written on the main thread. It works for the single-window case. If an app has two windows with different status bar heights (iPad multi-scene), they would overwrite each other. Keying the cache on the window scene would avoid this. It is not a blocker. - Minor, iOS: if the app starts with the status bar already hidden, nothing is cached yet. The top inset stays 0 until the bar is first shown. The PR already says this for iPhone landscape. It would help to say it for a cold start with a hidden bar too.
- Minor: the prop is now always sent to native, so
ignoreSystemBarsVisibility={false}shows up in downstream snapshot tests of the native tree (the 11 snapshots here changed). That is expected from codegen defaults, but it deserves a changelog line.
What I could not validate
- I did not build or run on a device or simulator, so the Android 13 and frame-diff result in the test plan is the author's and I did not reproduce it.
- Per the PR, the Android 6-10 path and iOS (no notch) have not run on a device. They are the riskiest paths, because iOS depends on
UIStatusBarManagerframe behaviour. A before/after recording on a non-notch iPhone or iPad simulator (status bar 20pt, hide then show) would be good to see. clang-formatandspotlessCheckwere not run. No CI checks have run on the PR yet. Only Vercel reports, and it needs a team member to authorize it.
Verdict: looks good, with minor points. The remaining decision is whether maintainers want this opt-in prop in the SafeAreaProvider API.
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
Closes #808.
When an app hides the status bar or the Android navigation bar for a moment (a photo viewer, a video player), the insets drop and every screen under it lays out again, then once more when the bars come back. This adds an opt-in
ignoreSystemBarsVisibilityprop onSafeAreaProviderthat reports the insets as if the bars were visible. Nested providers inherit it. The default isfalse, so nothing changes for current apps.getInsetsIgnoringVisibilitywith the same type mask, so the IME stays out. The feat: respect window insets a parent adjusts for its subtree on Android #791 max with the dispatched insets stays.stableInset*and the display cutout safe inset.SafeAreaViewon both platforms reads the flag from its provider, so it matchesuseSafeAreaInsets.Test Plan
yarn validate:jest: 39 tests pass. New tests cover the default, the prop reaching the native provider, inheritance and an explicitfalseoverride.yarn validate:typescript,yarn validate:eslint(0 errors) andyarn format:prettier:checkpass. clang-format reports nothing on the changed iOS files.🤖 Generated with Claude Code