feat(ios): expose four-edge native tab scene insets - #589
Open
thiagobrez wants to merge 1 commit into
Open
thiagobrez wants to merge 1 commit into
thiagobrez wants to merge 1 commit into
Conversation
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.
PR Description
Foreground content can overlap vertical native tab bars on iPhone Duo. Add
useTabSceneInsets()to expose the native scene's physical top/right/bottom/left safe-area insets, updating through layout and safe-area changes. Keep scene bounds and backgrounds edge-to-edge; apps opt in by applying the insets to foreground content.Insets are stored by route and exposed within each scene. The hook returns undefined before measurement, outside scenes, for custom tab bars, and on unsupported platforms. It leaves the existing bottom-height API unchanged. The Four Tabs Article example and docs demonstrate explicit padding, including physical-to-logical edge mapping for React Native RTL layouts and disabling duplicate automatic scroll adjustment.
How to test?
Open Four Tabs and inspect/scroll Article. Its text should clear the vertical bar while the white background extends behind it. Rotate between both closed landscape orientations, unfold to horizontal tabs, and switch away from Article and back.
Verified with agent-device 0.20.10, using Device Hub for Duo hardware rotation/folding:
Uses public UIView safe-area callbacks; no private view inspection. Android/macOS behavior and keyboard avoidance are outside this iOS inset API. Split View, sidebar transitions, and older iOS runtimes were not runtime-tested in this change.
Screenshots
Both recordings show Four Tabs / Article in the same closed landscape orientation. Before is upstream main with diagnostic logging only; after applies the new hook in the example. App interactions use agent-device; videos use explicit simulator display 1 because automatic landscape capture produced black recordings during the audit.
04-insets-before-overlap.mp4
04-insets-after-padding.mp4