-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Add pagingEnabled for vertical ScrollView on Android #10999
Conversation
By analyzing the blame information on this pull request, we identified @astreet and @janicduplessis to be potential reviewers. |
* when scrolling. This can be used for horizontal pagination. The default | ||
* value is false. | ||
* when scrolling. This can be used for horizontal pagination. Vertical | ||
* pagination is supported on Android. The default value is false. |
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 think better to just remove the line about horizontal pagination since it works for both now.
Ah thanks, I assumed it wasn't available on ios as well as platform wasn't specified. I've tested on ios now and can confirm it works. |
I don't think I've seen vertical paging in an Android app. Is this a common pattern? |
I don't think it's that common but I have seen it in a few, most notably Snapchat. I liked the mental model it built for the user and ease of navigation from gestures. It seemed perfect for a desktop companion app (working on the name..) that I'm currently building. |
Would very much like to see this merged, snapchat swipe navigation is very nice and would be nice to use a similar navigation with react-native. |
Any news on this? @satya164 |
@mkonicek what do you think? I think it's useful to have and provides feature parity with iOS |
Would like to have this merge as well 👍 |
Really would prefer to not have to wait another month for this. |
@raymondchooi can you rebase the PR against master? |
This is getting increasingly urgent for us. Please can we get it in 0.41 |
@pelle it's unlikely to go in |
@satya164 My apologies, I haven't used rebase before. I thought I just had to update from master. I've followed some guides and hopefully I've done it correctly. |
This is a pretty big change in a very frequently used component. This pull request is missing a test plan (see https://github.com/facebook/react-native/blob/master/.github/PULL_REQUEST_TEMPLATE.md). How did you test this doesn't break anything? Anyone who's blocked on this - consider releasing this as a separate native module. |
@raymondchooi I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
Sorry, I'm learning React Native now. PagingEnabled for Android isn't working? |
Any progress on merging this? |
@josiahruddell I don't see any comments from @raymondchooi after I last commented here. It also looks like we're waiting on a Test Plan to be added to the PR as well. |
Hey, sorry, things have gotten really busy on my end. I updated for merge conflicts a few times before but did not have time to get in to a thorough test plan. If anyone would like to contribute please feel free, else I'll try get to it when I can. I was also under the impression that this was still under discussion on whether or not this should be in the core. If it is decided, I will try and find some time to add the test plan. Personally, I think it should be as there are a few layouts such as gesture heavy navigation where this would be useful and it is available for iOS/does not seem OS specific. |
hello, how can i use this native code in my react native application?? this feature so important for my application |
For anyone needing this vertical paging feature on iOS and Android with urgency (as I did) you can use the react-native-snap-carousel component for vertical and horizontal slides. It works on both platforms and can be a workaround while this issue is in discussion. |
@rbravo i will try it, thanks!!!! |
Like @rbravo said react-native-snap-carousel might work but it has some other limitations, like all heights has to be equal. Thats not the case with ScrollView/FlatList. |
It's been almost 10 months since this pull request was made. When will this be merged? Can a timeline be made available? |
@khat33b I already left my feedback earlier, and the author mentioned they didn't have time to work on this. The length of time a PR has been open is not a good metric for whether it should be merged or not. If anyone wants to contribute a similar fix and has the time to work on getting it landed, you can open a new PR. |
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.
Add a test plan and release notes, and fix conflicts.
I can possibly make some time if there's a strong possibility of merging. I was under the impression that there was still a discussion going on on whether or not this should be in the core RN. If there is a strong possibility of this going in, I'll try make some time :) |
I just caught up with the earlier comments. I'll close this PR to make it clear it's unlikely to get merged. If anybody is interested in this functionality, your best bet is to implement it as a separate third party component. |
Summary:
This adds support for pagingEnabled to the Vertical ScrollView on Android.
This is an implementation of a3146e4 for vertical ScrollView. All the changes are pretty similar apart from a few structure changes to accommodate FB's own version of fling for when more content is added while ScrollView is animating. If pagingEnabled={true}, this is not used as smoothScrollToPage() is used instead.