-
-
Notifications
You must be signed in to change notification settings - Fork 580
feat (iOS): Support UITabBarController.Mode for iPad sidebar feature #3236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I left some minor suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want to add TabBarControllerMode
to unrelated test screen. Maybe we should create a separate one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Would be nice to test it on its own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this was the only test screen I found that referenced the bottom tabs in the right way to test this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we create Test3236
that will be very similar to Test3111
but with controller mode switching logic and simplified tab screen content (without unnecessary counters, etc.). Then we can revert changes to Test3111
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Thank you for the contribution!
Posting initial review here. Native implementation looks fine. We need to get rid of version bumps & lock file updates from this PR.
I haven't tested runtime yet though. Will do shortly & come up with follow up review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes must be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted the RN version change. Are you ok with the additional scripts for local testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes must be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Would be nice to test it on its own.
RCT_REMAP_VIEW_PROPERTY( | ||
tabBarControllerMode, | ||
tabBarControllerModeFromRNSTabBarControllerMode, | ||
RNSTabBarControllerMode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is necessary. You could most likely get rid of whole RNSTabBarControllerMode
enum, simply by adding RCTCovnert
implementation for UITabBarControllerMode
. This should be possible.
I see now, that we do similar thing above & you followed what's already there. That's fine then. @kligarski would you take a look at what I'm saying later in the week?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, we can probably ignore the prop completely if we are using SDK < 18/26. I added an issue to our internal board: https://github.com/software-mansion/react-native-screens-labs/issues/471 and I'll have a look at it after this PR is merged.
Co-authored-by: kligarski <[email protected]>
This reverts commit 1e38b1b.
This reverts commit 980f89d.
abb1b84
to
9211b95
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! After creating separate test screen for this PR, I think that we can proceed.
RCT_REMAP_VIEW_PROPERTY( | ||
tabBarControllerMode, | ||
tabBarControllerModeFromRNSTabBarControllerMode, | ||
RNSTabBarControllerMode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, we can probably ignore the prop completely if we are using SDK < 18/26. I added an issue to our internal board: https://github.com/software-mansion/react-native-screens-labs/issues/471 and I'll have a look at it after this PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we create Test3236
that will be very similar to Test3111
but with controller mode switching logic and simplified tab screen content (without unnecessary counters, etc.). Then we can revert changes to Test3111
.
Description
Add support for
UITabBarController.Mode
(automatic, normal tab bar, or sidebar on iPad).See https://developer.apple.com/documentation/uikit/uitabbarcontroller/mode
Changes
Test code and steps to reproduce
Test3115
and the sharedBottomTabsContainer
have been modified to add support for testing this feature.Checklist