-
Notifications
You must be signed in to change notification settings - Fork 2.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
🔥 4.0.0 beta.x #678
base: master
Are you sure you want to change the base?
🔥 4.0.0 beta.x #678
Conversation
Awesome work. I am looking forward to this. One thing I noticed when testing 4.0.0-beta.2 is the ability to only move one item at a time is gone. I tested on iOS with both |
@AAAstorga Well, the logic is completely different and we're now leaving this to the native scroll instead of trying to compensate for it with JS hacks. That's definitely a tradeoff. However, I suggest you take a closer look at |
src/carousel/Carousel.js
Outdated
paddingRight: this._getContainerInnerMargin(true) | ||
}, | ||
contentContainerCustomStyle || {} | ||
contentContainerCustomStyle || {}, |
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.
Why does this come before the next line? I would like the ability to add extra padding if I have a Header / TabBar. The contentContainerCustomStyle padding gets overwritten if I choose not to use useExperimentalSnap
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 totally understand the need, but the issue is that it will then mess with the inner logic (the active item's calculation will be completely off). However, now that I think about it, with the updated _getActiveItem()
logic it might just work out-of-the-box.
Do you mind doing a few tests on your end? If you move this line after the override line 1080
and change the padding, is onSnapToItem
still firing reliably and with the proper index? With all 3 different activeSlideAlignment
values?
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.
@AAAstorga Did you ever have a chance to test what we mentioned above? :-)
I am using rn 0.62.2 and got this warning
|
@r0b0t3d This is the issue described in #673. Unfortunately this is is a big one. Read this comment to understand why. |
I have been researching the issue of smooth scrolling and came across this exciting new update.. This carousel is the center piece of our app and we really want to have an excellent experience - well, this update brings it! I installed beta 2, removed the deprecated properties and wow - fantastic. The feel and usability is excellent - thank you to all for this great improvement. Since our use case is pretty vanilla; simple carousel for swiping cards, we've decided to upgrade the app now and keep a watch on issues. Thanks again for all your hard work! Update - The pagination dot doesn't update until the slide completely stops. Would be an improvement to have the dot update as soon as the destination slide is determined. Update 2 - I see prop onScrollIndexChanged and replaced onSnapToItem with it. The carousel i'm using for test has just three cards. When swiping from card 0 to 1, 1 to 2, or 2 to 1 the slide momentum stops early and the slide really snaps into place. However, when swiping from slide 1 to 0 the momentum of slide 0 is smooth until stop (no snap in place). Pagination works as expected though ;-)
Update 3 - I noticed that loop={true} doesn't loop. I tested with 8 cards in the carousel and the rendered set is 14 cards and stops at both ends. So 6 of the 8 cards are duplicates. |
@ajp8164 Thanks a lot for the feedback! We're already using it in production as well — couldn't wait to please our users with that smooth scrolling :-) Re: Pagination I'll admit I haven't tried it yet. My guess is that we need to connect the relevant logic to Re: onScrollIndexChanged To be honest, I don't expect it to work properly given your example. Basically, you're updating the state in the callback, but as a result the Re: Loop This is surprising! I've made sure to test the loop thoroughly and can confirm it was working on both iOS and Android. Do you mind sharing your setup? |
Great call on the firstItem value - removing it fixed the slide snap problem. It also solves the pagination dot rendering - it no renders while the slide is slowing down. Regarding loop - After some experimentation I have it working. The slides in the loop are vertical stack. sliderHeight and itemHeight are set. sliderWidth and itemWidth are not. When i add itemWidth the looping works correctly. Setting sliderWidth didn't have any effect. Your reply helped greatly - thank you very much, I appreciate you guys! |
About to take the plunge by implementing beta (first time using this plugin). Just wanted to get an idea of how close we are to beta 3? |
Hi, i've tested version 4 beta 2, it works fine, the only problem I noticed is that the |
@alessandro-bottamedi Thanks for testing! It's actually been fixed with #696. |
@r0b0t3d Just implemented the solution you suggested to get rid of the However I didn't test it on RN < 0.60... Version |
@alessandro-bottamedi Is it working if you remove the following in your local If yes, then the deprecation fix is unfortunately doing more harm than good... There are other ideas mentioned in #673, but none of them is perfect. |
Yes, i confirm that everything works correctly without those lines |
just upgrade to beta3, works fine on my side. using rn 0.62.2 |
@alessandro-bottamedi could you change above code to
This code works in 0.62.2, need your confirm in 0.61.x |
It seems that everything works correctly with this change on RN 0.61.5! 👍👍 |
great! @bd-arc what do you think? |
Great idea @r0b0t3d! And thank you @alessandro-bottamedi for testing it on such a short notice :-) Want to make a PR for this branch and one for If you're pressed on time, I'll take care of it myself. |
it is ok for me. but there is another PR for this case #673. should I create another one? |
@r0b0t3d Sure, go ahead! Once your two PRs are merged we should finally be able to say goodbye to that issue. |
Ok, version Kudos to @r0b0t3d 🙌 |
Hi @bd-arc, thanks for your hard work with this library! I am trying to test v4. Do you know if there's some away to add the types? I've tried |
@nelsonprsousa Well, I'm not the one maintaining those types, so the definitions are not up-to-date with the beta. The plan would be to migrate the whole library to TypeScript, but I haven't found the time to do so yet... |
Oh, my bad 😅 I've already tested 4.0.0-beta.4 and it is working as expected (even parallax images and pagination). And much faster and smoothly. Awesome job! 🚀 Gonna remove @types/react-native-snap-carousel for now 👍 |
hey everybody, thanks for the 4.x version, its awesome, just want to let you know that upgrading from 4.0.0 beta.3 to 4.0.0 beta.4 broke horizontal slider fro me, on the second cycle of sliding slide nr 4 appeared to react like it was the last slide(although there were 7 slides), so I could swipe further, only swipe back. The same issue I had with the latest 3.9 version, that's why started to test beta's |
ah, that totally makes more sense! 🤦 |
Why |
In version 4.0.0-beta.6, I have a loop stuck problem on ios, I tried to find the cause in the library and I see now when the stuck list scrollOffSet is not updated causing the problem Trying, checking between nextActiveItem and activeItem is negligible. I skipped the check (nextActiveItem! == this._activeItem) in _onMomentumScrollEnd and everything worked fine. I'm a novice so I can't find out the cause of the bug deeply, someone can and fix it. (react-native 0.63.3) |
@creat-or Use |
guys, how stable is latest beta? Does it ready to use in production? |
@anmlkh We've been using it in production for months, but take it with a grain of salt since the way we use the plugin is not necessarily the same as yours. What you see is what you get :-) |
Same here! |
I'm getting the exact same errors(though, only the first two imports from your example). What I ended up doing was putting |
Hi all! 🖖
|
Has development on 4.x stalled? |
Looking forward to the v4 of this awesome library! |
Anyone knows if there's a status update for this? |
@bd-arc Any release date in mind yet? |
anyone using v4 in production? @Titozzz seems to be the last committer in the v4 branch a year ago |
I am using it in production.
Will be good to have some updates here. Yes.
Broda Noel
… El 6 oct. 2021, a la(s) 12:39, Ricardo Tomasi ***@***.***> escribió:
anyone using v4 in production?
@Titozzz seems to be the last committer in the v4 branch a year ago
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
💫 Production-ready?We've been using version 4 in production in all our apps for more than a year now, and it's been a game changer! However it has not been merged yet since some users have been reporting issues that we've never been able to reproduce with our own use cases. 📍 Current state of affairsSince you guys understandably want an update, you should know that I've been moving away from development, and therefore am no longer maintaining the library. As you can see in #632, I've been looking for maintainers since December 2019. Unfortunately, no one has really stepped up... yet? I've taken care of the biggest pain point described there with version 4; now it just needs some polish for everyone to enjoy. Here are the two main things to address in case you're interested 🙂 Please understand that I've spent hundred (if not thousands) of hours since 2016 creating, maintaining, and improving this library. I loved the journey and was very happy to give back to the Open Source community. But now that I'm done with development for good, the library's in your hands! Cheers |
thanks @bd-arc for awesome libs, |
same here! |
Hi! I have really simple needs, a swipeable gallery preview with pagination. onSnapToItem wasn't working perfectly. Then I discovered v4 beta. onScrollIndexChanged works like a charm, thanks! 🎉 One tiny problem though, typescript is not happy that the |
v4 typings are non functional, that's one of the issues holding us back from upgrading. |
Hi one question, is the package still supported? |
@KirillSocivka02 It is kind of supported i guess? Basically, the main features are set in place as far as I know. There are other features that are still not been implemented but for my personal usage they are not important. |
One example of this is that PaginationProps is not exported so you can't easily extend components... |
I wouldn't say so. The last commit in this PR is from July 2020 and the latest stable release is from May 2020. |
It's been two years, is 4.0 still available? |
Release notes
Everything you want to know about the upcoming version is here
Go on and comment below, ask your questions, provide feedback, and share your insights 😉