GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
563 stars 59 forks source link

[Request]: Support back gesture in media lightbox #375

Closed eobet closed 9 months ago

eobet commented 1 year ago

Describe the request

On a laptop with a touchpad, you still have to move the pointer to the top left corner and tap in order to exit the media lightbox.

It would be more efficient for pure touchpad navigation if the general two finger swipe to the left would be recognized and supported as a means to go back to the timeline.

Implementation Details

eobet commented 1 year ago

Even the "Gesture Improvements" Gnome Extension, with a special forward/backward App Gesture addition for Tuba could not get this working.

eobet commented 1 year ago

Ok, this won't work with posts containing multiple images if they have to be arranged horisontally... would it be possible to enable a different gesture or arrange them vertically instead?

Right now, the media lightbox is the only thing forcing you move the cursor to the extremes of the app window to navigate out of. Basically every other common interaction you perform with the app (except for posting) can be made by keeping the cursor near the middle of the screen...

This might be solved by the single click on the background, but the more I think about it, a single click anywhere to close the media lightbox would probably be preferrable for the fastest navigation possible!

GeopJr commented 1 year ago

There was (still is on v0.3.2) a drag gesture to dismiss it (drag the image up or down). It was removed on #326 due to issues with mobile devices triggering it on touch (which I couldn't reproduce on desktop with touch simulation).

if the general two finger swipe to the left would be recognized and supported as a means to go back to the timeline

Ok, this won't work with posts containing multiple images if they have to be arranged horisontally... would it be possible to enable a different gesture or arrange them vertically instead?

I'll consider drag to dismiss again but it will have to go through extensive testing on mobile first.

The Carousel is as-is (gestures, direction and all).

Right now, the media lightbox is the only thing forcing you move the cursor to the extremes of the app window to navigate out of. Basically every other common interaction you perform with the app (except for posting) can be made by keeping the cursor near the middle of the screen...

I don't think the main view and the media viewer are comparable. The main view is a list of items, the media viewer has a single focus point (the media) and actions around it.

a single click anywhere to close the media lightbox would probably be preferrable for the fastest navigation possible!

While more gestures are definitely nice to have, we are reaching the point where users might feel overwhelmed and perhaps scared of what action might get triggered by simply touching their touchpad or screen. There's 5-6 different ways (keyboard and mouse shortcuts) to go back, the media viewer alone has horizontal drag, pinch to zoom, 2 finger swipe, (soon) double click, general drag when zoomed in to pan, mouse wheel when zoomed in & other gestures. I don't think single click to dismiss is appropriate.

CaptainMorgan12 commented 1 year ago

I think a better way to use touchpad, or touchscreen device navigation to go back to timeline is using two fingers with image shown fully zoomed out:

  1. within open media viewer, swipe two fingers down on image displayed
  2. closes media view
  3. shows timeline where media was opened Notes: this would only work if image is not zoomed in from initial view since then it just could be confused with zoom function.

Instead of two fingers swiping left or right since that is already used to switch between images.

The two fingers swiping down feels very natural in removing what you are looking at (like tearing a page off the notebook). I have not seen that implemented in Gnome, however there are various iOS apps where an opened image (fullscreen image type) is dismissed by swiping down with two fingers.

tpikonen commented 9 months ago

Tuba 0.6 closes the media view with swipe up/down (one finger on touchscreens, two fingers on touchpad). I think this is about good as it gets, since horizontal swipes change the image.

GeopJr commented 9 months ago

Yeah, I think we can close this now!

fixed by: #602