kkemple/react-native-sideswipe

Feature Request: Autoplay, Loop

jadidian opened this issue · 6 comments

Hi, I'd love to use this nice slim library in my recent project but I have to switch to something else mostly because it lacks RTL support (in RTL the swipe gesture moves slides to the opposite direction); I guess it should be an easy fix, probably checking I18nManager.isRTL and changing some -/+ would do the trick.
My other suggestions, if they fit in the scope of this project, would be adding the ability to loop through data by adding some paddings to the data and having autoplay option, just like a slide show.

Hey, thank you for reporting this issue! RTL support is definitely within scope but I think autoplay and loop are a bit more and could be accomplished with a HoC or something that is not a core part of the library. I am however willing to discuss if a simple enough solution can be added and it doesn't add a lot more to the API. One of the main drivers of creating this lib was to simplify the API needed to create a carousel.

If you wouldn't mind updating this title and description to focus only on RTL support and opening a new issue for autoplay/loop that would be awesome. This way we can discuss one while I start on RTL support.

Cheers!

Sure, I'll leave this as feature request for autoplay and loop, and will open a new bug report for RTL.
Cheers.

Here's the other issue for RTL: #26

perfect! thanks!!

i've been thinking about this and I think we can achieve this goal with an HoC that sits over the implementation of this carousel. Essentially setting the timing, behavior, padding the data set, these are all things that can be managed by a higher level abstraction, leaving the carousel unchanged and still a simple solution which is the goal of this project.

The question then becomes do we make this "officially supported" since we are then saying we will maintain and fix all issues. 🤔

@kkemple maybe not officially support it but just suggest a basic example of loop and autoplay HOC sample in the README?

i've been thinking about this and I think we can achieve this goal with an HoC that sits over the implementation of this carousel. Essentially setting the timing, behavior, padding the data set, these are all things that can be managed by a higher level abstraction, leaving the carousel unchanged and still a simple solution which is the goal of this project.

The question then becomes do we make this "officially supported" since we are then saying we will maintain and fix all issues. 🤔
maybe not officially support it but just suggest a basic example of loop and autoplay HOC sample in the README?