feat(iOS, Tabs): support active nested content scroll view markers#3807
Open
Miyou wants to merge 2 commits intosoftware-mansion:mainfrom
Open
feat(iOS, Tabs): support active nested content scroll view markers#3807Miyou wants to merge 2 commits intosoftware-mansion:mainfrom
Miyou wants to merge 2 commits intosoftware-mansion:mainfrom
Conversation
665a583 to
f240550
Compare
Author
Member
|
Hey @Miyou. Thanks for the PR. Support for content scroll view handling on both platforms is exactly what we introduced the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This extends
ScrollViewMarkerso Tabs can bind their content scroll view to an explicitly active nested descendant instead of relying only on first-descendant or visibility heuristics.This is aimed at layouts where tab content is wrapped by non-scroll containers and multiple descendant
ScrollViews stay mounted at once, for example paged day views. In those cases the tab bar can stay attached to the first registered scroll view, which breaks minimize behavior and repeated-selection scroll-to-top for the currently visible page.Changes
active?: booleantoScrollViewMarkerRNSScrollViewMarkerComponentViewnotify seeking ancestors when active state changesRNSTabsScreenComponentViewto track registered descendant scroll views by marker and prefer the active one infindContentScrollViewsetContentScrollView(_:forEdge:)fromRNSTabsScreenViewControllerso UIKit observes the resolved nested scroll view for the tab baractivesetter to keep the prop surface alignedContext
This follows the direction discussed in #3463 and builds on the marker work from #3674.
Validation
yarn check-types