fix(android): reserve navigation bar slot for drawer - #81
Open
jsdatarocks wants to merge 2 commits into
Open
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.
Description
Summary
Opts the Android drawer root host into the navigation bar slot reservation API introduced by NativePHP/mobile-air#404.
Together, the two changes prevent the drawer button from overlapping the navigation title while preserving the drawer's current overlay implementation.
Problem
On Android, the

mobile-uidrawer button is rendered as an overlay at the top-left of the root content. Themobile-airTopAppBarpreviously reserved its navigation slot only for a back button, so a root screen with a drawer and no back button placed the navigation title underneath the drawer icon.iOS already positions the drawer button and title without this overlap.

Changes
native-ui.drawerroot host withreservesNavigationBarSlot = true.mobile-airimplementation to reserve a48.dpnavigation slot while thenative_drawersentinel is present and no back button is shown.Dependency and rollout
This PR depends on NativePHP/mobile-air#404, which adds the
reservesNavigationBarSlotregistration parameter and handles the reserved slot in the stack and tab root renderers.The changes should be merged and released in this order:
NativePHP/mobile-air#404.mobile-uiPR.The updated
mobile-uisource will not compile against amobile-airversion that does not yet provide the newregister()parameter.Testing
The companion
mobile-airPR includes registry unit coverage and Compose layout tests for both stack and tab root renderers. This PR adds a Pest contract test that verifies the Android drawer registration consumesnative_drawerand enablesreservesNavigationBarSlot.The combined changes should be manually verified on Android with:
modalandrevealdrawer variants.