-
-
Notifications
You must be signed in to change notification settings - Fork 576
feat(iOS, SplitView): Add API for organizing columns #3003
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
Conversation
4a90c74
to
4ccfd22
Compare
749b327
to
d88a21b
Compare
4ccfd22
to
51eec95
Compare
d88a21b
to
df6af72
Compare
692b84a
to
04ee9c3
Compare
d9aa9fa
to
c6be87a
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.
I have a series of remarks. This looks good overall.
737cda8
to
415cfb0
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.
Last few remarks, and we shoudl be good!
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.
Include verbally agreed adjustments & let's go. Thank you!
Description
Closes https://github.com/software-mansion/react-native-screens-labs/issues/229
In this PR, I'm adding new APIs for SplitView column management. I updated
SplitViewScreen
component export to separateColumn
which is rendered as typical SplitViewColumn andInspector
which in some cases might be rendered as modal. Additionally, I'm adding a prop to Host for toggling inspector, at the moment it's really laggy, but I'm leaving it as a followup.In this PR we also noticed that the logic for updating props needs to be updated. For number of columns management we need to delay
SplitViewHostController
initialization until we'll receivereactSubviews
from the initial render. This is causing a problem, when 1stupdateProps
call is coming, because if inspector should be displayed, we need to notify the component about that fact. Therefore, this logic was rewritten to collect all prop updates in batch, create controller on 1stupdateProps
call and notify controller to flush updates ondidMount
.Changes
SplitViewBaseApp
showInspector
prop to host componentcolumnType
prop to screen componentTest code and steps to reproduce
Updated
SplitViewBaseApp
inspector-mobile.mov
inspector-tablet.mov
Checklist