-
Notifications
You must be signed in to change notification settings - Fork 24.9k
feat: DrawerLayoutIos #37928
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
feat: DrawerLayoutIos #37928
Conversation
Base commit: 637ffb1 |
|
To the reviewer, this is definitely WIP. I think we should have DrawerLayoutIos props aligned with DrawerLayoutAndroid and have the native code in How can I easily edit |
|
Just for ref: this is re-land of #37924 |
|
@cortinico can you ping someone to review this? |
|
@Pranav-yadav I started the refactor yesterday evening. I'm updating react views instead of the template and using the drawer in rn-tester app as it should be done. I'll also align the interface between both; especially the renderDrawer prop. There will be a new prop introduced 'visible' which would be responsible from Js to have the drawer view setup (open and close methods still responsible for showing it). As currently DrawerLayoutAndroid doesn't work with react navigation because a view doesn't unmount when navigating away. Fixes #37495 |
|
Sure. That seems great. |
| function DrawerDefault() { | ||
| return ( | ||
| <DrawerLayoutIos visible width={420}> | ||
| <View style={styles.modalContainer}></View> |
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.
⚠️ packages/rn-tester/js/examples/DrawerLayoutIos/DrawerLayoutIosExample.js line 19 – Empty components are self-closing (react/self-closing-comp)
|
Why should this component go in React Native core? Would it be better served as a community package? We have DrawerLayoutAndroid because it's a core Android SDK component, but it would be better if these weren't part of React Native's core. |
cortinico
left a comment
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.
See @javache comment. We're looking into making the core smaller, and we don't want to add other components like this one. Is there a strong argument to have this oen included?
Summary:
Adding equivalent of existing DrawerLayoutAndroid.
I'm using the method added in PR #37873 for AppDelegate too only contain enhancements.
Native Drawer, with gestures and button to open and close.
It does have issues:
Changelog:
Pick one each for the category and type tags:
[IOS] [ADDED] - Adding LayoutDrawerIos
Test Plan:
Tested on simulator iPad Pro iOS 16.2