-
Notifications
You must be signed in to change notification settings - Fork 126
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
TwoPaneView component #197
Comments
I think this makes perfect sense and we should start building and iterating on this. |
This proposal looks really good to me! A couple questions:
Thanks for putting this forward, I'm excited to see this light up! |
Introduction
Apps that present their content in the master/details pattern or target other scenarios for dual-screen devices could benefit from a dedicated component that helps to manage the layout of two distinct app regions. Windows native introduced the two-pane view and I propose creating a similar RN module.
The Core of It
I propose a new module that will manage the layout of two children, Pane1 and Pane2. App developers will be able to specify the desired widths of the panes (usually relative to each other). When spanned on dual-screen devices (this state would be detected using the new device info proposed in #189) the pane widths will be determined by the hardware. TwoPaneView will avoid placing content in the seam, making it easy for developers to create apps with logical UX on dual-screen devices.
TwoPaneView will show either one or both of its panes depending on the width of the component. When TwoPaneView is less than 641 DPs wide and in Auto mode, only one pane will be visible and developers will use pane priority to specify which pane. The app can force TwoPaneView to show only one pane using the Single mode or always two pane, regardless of overall width, using Double mode.
API
Discussion points
I will continue to add detail and props to this proposal but would appreciate any early feedback.
The text was updated successfully, but these errors were encountered: