-
-
Notifications
You must be signed in to change notification settings - Fork 585
feat(iOS): Implement ScrollViewProviding protocol #3238
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
108ebe5
to
74644fe
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.
Hey, this looks really promising. Good job.
Please remove all usages of the new method. I want to see dedicated PR for each swapped method & analysis of before & after applying the change. So that it is documented why it is needed & what problems it solves.
74644fe
to
dd6f7cc
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.
This looks solid now.
Please update the PR description before merging.
4c3489c
to
565df0a
Compare
Closes https://github.com/software-mansion/react-native-screens-labs/issues/456
Description
This PR implements ScrollViewProviding protocol as per internal discussion. The protocol enables us to be smarter about finding content ScrollView than simply descending into 0th child. A class that implements this protocol can decide how to continue the search. To complement the feature, ScrollViewFinder is updated with new method,
findContentScrollViewWithDelegatingToProvider
that takes advantage of the protocol.Note that we don't add the support for SplitView, because there should be no reason for it to be nested inside another container.
Changes
ScrollViewProviding
protocol, with implementations forRNSScreenStack
,BottomTabsHostComponentView
. The implementations continue search directly from their currently selected screens. This has the desired side-effect of completing the search even if the screen is not yet mounted in host hierarchy.ScrollViewFinder
to include a method that takes advantage of the new protocol, while leaving the simple versionTest code and steps to reproduce
Use Test3212; For now, nested containers may not behave as expected, because the new "smart" method is not called yet; things will change in the following PRs