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

Mobile controls on gallery lightbox #2538

Open
sleetx opened this issue Apr 28, 2022 · 4 comments
Open

Mobile controls on gallery lightbox #2538

sleetx opened this issue Apr 28, 2022 · 4 comments

Comments

@sleetx
Copy link

sleetx commented Apr 28, 2022

On mobile devices, the gallery lightbox does not respond to standard mobile controls. This is sometimes called "touch gestures" or "swipe navigation". Stash still uses desktop image controls despite being in mobile format.

To reproduce:
Open gallery lightbox on a mobile device. When attemping to swipe left or right, the image follows the user's finger moving around the screen - often moving most of the image off-screen depending how far you swipe. In addition, double tapping the image does not control zoom, it simply detects which half of the image you tapped and decides to go back/forward one image (like the desktop controls).

Expected functionality should match most mobile UI interfaces:

  • Left/right swipe moves to the previous or next image
  • Double tap to zoom in; double tap again to fit-to-screen
@sleetx sleetx added the bug report Bug reports that are not yet verified label Apr 28, 2022
@WithoutPants WithoutPants added feature request and removed bug report Bug reports that are not yet verified labels May 5, 2022
@WithoutPants WithoutPants changed the title [Bug Report] Mobile controls on gallery lightbox Mobile controls on gallery lightbox May 5, 2022
@echo6ix
Copy link
Contributor

echo6ix commented May 19, 2022

Just a note, touch gestures should not be limited to mobile viewports. Swipe navigation is also very useful on laptops and large viewport touch devices.

@echo6ix
Copy link
Contributor

echo6ix commented May 19, 2022

From Discord

Not sure what lightbox is being used in stash, but there are a few open source alternatives that support mobile swipe and double-tap zoom controls https://github.com/andreknieriem/simplelightbox

@eoop
Copy link

eoop commented Jul 8, 2022

Photoswipe is also an excellent open source mobile + desktop image gallery. It supports many types of photos including very high resolution images.
https://photoswipe.com/

@ghost
Copy link

ghost commented Aug 27, 2022

Indeed with https://github.com/dromru/react-photoswipe-gallery it should be pretty trivial to do.
After experimenting a bit, the main change would be the current lightbox component is used inside of ImageList and GalleryList.
The new lightbox would wrap those instead.

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

No branches or pull requests

4 participants