Skip to content

Improve swipe experience#12168

Merged
Gargron merged 1 commit intomastodon:masterfrom
umonaca:feature-improve-swipe-upstream
Oct 24, 2019
Merged

Improve swipe experience#12168
Gargron merged 1 commit intomastodon:masterfrom
umonaca:feature-improve-swipe-upstream

Conversation

@umonaca
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants