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

Swipe left/right for next/previous picture #45

Open
Ckef opened this issue Apr 29, 2019 · 1 comment
Open

Swipe left/right for next/previous picture #45

Ckef opened this issue Apr 29, 2019 · 1 comment
Assignees
Labels
ui User interface related

Comments

@Ckef
Copy link
Contributor

Ckef commented Apr 29, 2019

In addition to the left/right buttons, swiping would be nice on mobile.

@duijf duijf added the ui User interface related label Apr 29, 2019
@duijf
Copy link
Contributor

duijf commented Apr 29, 2019

I think swipe to navigate is nice, but one of the explicit goals of pxl (and the reason we got it out of the door in < 200 commits) is to not re-implement stuff that browsers do already.

That being said; I'd be delighted to accept a well-written pull request which implements swipe navigation in a nice polished way. However, I am a bit pessimistic about the chances of such an effort; especially on whether the implementation would be a net-win for all users.

I am concerned about:

  • Performance on lower-end devices
  • 'Native'-feel or lack thereof
  • Maintenance burden of the swipe code

I feel this way because there isn't a standard/browser API for detecting gestures. There's touchstart/touchmove/touchend, but then you end up with code like this: https://stackoverflow.com/a/23230280/2099958

So you have two options:

  • Write something yourself. I'd be open to a PR which does this nicely.
  • Add a bunch of dependencies from NPM. If we do this, I'd like this dependency vendored and to be usable without a module bundler.

I'd judge a potential PR implementing this on:

  • Emperical performance on a low end device
  • Does it actually add to the UX and polish of pxl?
  • Whether it imports a bazillion lines of JS (perf, maintainability)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui User interface related
Projects
None yet
Development

No branches or pull requests

3 participants