nolanlawson / pinafore

Alternative web client for Mastodon (UNMAINTAINED)
https://pinafore.social
GNU Affero General Public License v3.0
1.02k stars 172 forks source link

Swipe gesture on mobile #38

Open nolanlawson opened 6 years ago

nolanlawson commented 6 years ago

Swipe left and right on a timeline to switch columns, so you don't need to tap the button in the navigation header.

I avoided this because I found that the react-swipeable-views on Mastodon sometimes has false positives on certain browsers. E.g. on mobile Firefox you scroll down, but it's interpreted as a swipe, which is confusing. Also touchmove events can block scrolling.

I think it may be possible to do this performantly and accurately with Pointer Events, but this needs some investigation first.

nolanlawson commented 5 years ago

Update: I would be willing to do this if

  1. It used pointer events rather than touch events so that scrolling is not de-optimized
  2. It had good heuristics to avoid false positives
  3. It had an option to disable it

We could also make the keyboard shortcuts <- and -> go left and right.