meliorence / meliorence/react-native-snap-carousel
Multiple small items not scrolling with momentum on iOS [Needs Fixing on latest version 3.8.4]
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Is this a bug report, a feature request, or a question?
Yes, A Bug report.
Have you followed the required steps before opening a bug report?
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn't already been reported.
There is this one ticket that could be closely related: https://github.com/archriss/react-native-snap-carousel/issues/51, but in the lower posts op has described it different then my scenario, he is trying to use it with some map component. P.S it is closed due to no further feedback. - I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
Have you made sure that it wasn't a React Native bug?
Not sure.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Only happening on iOS, working fine on Android, tested on simulator and physical devices.
Is the bug reproductible in a production environment (not a debug one)?
Yes happening in production env also.
Environment
I have been using expo environment to develop, its on the latest expo version sdk 35, and i have tested with the latest snap carousel version. react and react native versions are latest that are supported by the expo sdk.
Environment:
React: 16.8.3
React native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz
react-native-snap-carousel: 3.8.3
Target Platform:
iOS (12.4.2)
Expected Behavior
Scrolling multiple item should be smooth like the android system.
Actual Behavior
Scrolling multiple small items horizontally with momentum is only scrolling 1 item, sometimes it looks like that its going to scroll multiple items but then it either doesn't snap to the center of the carousel or just returns back to the last item which was next to the previously centered item.
Reproducible Demo
https://snack.expo.io/@summersyed/snap-carousel-momentum-scroll-bug
Steps to Reproduce
- just try to scroll carousel in the above link to either left or right side, using swing gesture. which should scroll multiple item with one swipe.
- see that it only scrolls 1 item at a time.
- try this couple of times to check it carefully.
although bug is apparent on the iOS simulator provided with expo, you can check it out more clearly on an actual iOS physical device, I have tested it on iPhone 6 and iPhone X, both are not able to scroll multiple items on dev and prod version of the app.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Expo Snack reproducible demo and reproduce the horizontal momentum gesture on iOS simulator and physical devices. Compare the behavior with Android using the reported React Native Snap Carousel 3.8.x environment. Done means a swipe across multiple small items advances through multiple items and reliably snaps the next item to the center on iOS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100