leecade / leecade/react-native-swiper

3 view week swiper, prevent new swipe before animation has ended?

Open
#278 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

I'm using the Swiper to change weeks in a calendar. In order to do this, I'm setting up 3 views like this. let's assume I'm watching week 11:

<Swiper>
  <View>Week 10</View>
  <View>Week 11</View>
  <View>Week 12</View>
</Swiper>

Now when I swipe back to Week 10, Week 12 should be removed, and Week 9 will be inserted dynamically before Week 10, so the new result is:

<Swiper>
  <View>Week 9</View>
  <View>Week 10</View>
  <View>Week 11</View>
</Swiper>

I think this will break if the user swipes very fast (which also triggers issue #245), and it will not be able to insert the week before the user swipes into the view.

So is it possible to prevent the user from swiping before the animation has ended? Or will it feel uncanny to the user?

Also, do you think this is a good idea for a week-selector, or should I set it up differently?

Thanks for an awesome swiper! :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Swiper component's swipe animation behavior and the related issue #245. Determine whether input can be blocked until animation completion and whether the three-view week rotation remains reliable during rapid swipes; the issue is done when this behavior and the recommended setup are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.