Skip to content
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

Improve swipe experience #12168

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

umonaca
Copy link
Contributor

@umonaca umonaca commented Oct 15, 2019

Currently the swipe is too sensitive on mobile devices. Related issues: #4038 and #4035.
The react-swipeable-views changed a lot since 2017 so the previous commit no longer works.

Changes:
threshold={15} sets the speed threshold to be three times less sensitive than default to be identified as a quick-swipe. The default value is 5, which is too sensitive according users' feedback.
hysteresis={0.2} sets the delta threshold to be 20% of width to swipe for a slow swipe. By default this value is 0.6, which means users have to swipe 60% of the width to switch to another page during slow-swipes. The default value does not make sense.

I have tested these values and saw no side-effect.

Reference:
[1] react-swipeable-views API document: https://react-swipeable-views.com/api/api/

@umonaca
Copy link
Contributor Author

umonaca commented Oct 16, 2019

Well, GitHub shows waiting for CI status forever...

@Gargron Gargron merged commit f4be89e into mastodon:master Oct 24, 2019
aji-su pushed a commit to aji-su/mastodon that referenced this pull request Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants