zooniverse / front-end-monorepo

A rebuild of the front-end for zooniverse.org
https://www.zooniverse.org
Apache License 2.0
104 stars 30 forks source link

Add mouse wheel zoom to image subject viewers #5109

Open goplayoutside3 opened 1 year ago

goplayoutside3 commented 1 year ago

Package

lib-classifier

Is your feature request related to a problem? Please describe.

This Issue stems from this Talk post. In that post, the volunteer explains that in FEM, mouse wheel Zooming is currently not working at all on Classify page. Mouse wheel zoom is enabled in PFE's classifier, and the volunteer reports that the lack of this feature in FEM is a downgrade to their classifying experience.

Note that when this feature is implemented in FEM or a different conclusion is reached, a Zoo team member should update the volunteer with a post in their Talk thread.

Additional context

In this older Issue #2075, there was discussion about mouse wheel zoom in FEM. At that point in time, the multiframe subject viewer did respond to mouse wheel zoom, but a subject image that extended beyond the viewer due to being zoomed in would unexpectedly respond to the mouse wheel in the overflow area.

Implementing mouse wheel zoom means that volunteers can't hover over a subject image and expect to be able to scroll down the window.

In PFE, mouse wheel zoom is turned off for drawing mode. By default, the mouse wheel scrolls the page, unless you select the panbutton, when it switches to wheel = zoom in/out.

NfN project team directly requested mouse wheel zoom in Issue #2075.

Question

Based on the info above, mouse wheel zoom should be implemented. Should wheel zoom be enabled for all subjects that are images? Should it be only enabled when pan mode (MoveButton component) is selected in the image toolbar?

seanmiller26 commented 1 year ago

If we're matching PFE then yes we should only enable scroll wheel zoom when the pan tool is selected (or if the image is clicked - as this also enables the pan tool).

@eatyourgreens what are the accessibility issues with this option?

eatyourgreens commented 1 year ago

Mouse wheel zoom does work for Galaxy Zoo: Weird and Wonderful, so support is inconsistent across the different image viewers.

eatyourgreens commented 1 year ago

@eatyourgreens what are the accessibility issues with this option?

Sorry, I don't understand the question. Did you have particular issues in mind, or a particular audience.

I was originally opposed to removing mouse wheel zoom from the image viewer, so I'm strongly in favour of restoring it.

eatyourgreens commented 1 year ago

In the meantime, it might be worth reminding maricksu that the subject can be zoomed and panned with the keyboard. That works pretty smoothly on Snapshot Serengeti (+/- to zoom and the cursor keys to pan the image.)

https://www.zooniverse.org/projects/zooniverse/snapshot-serengeti/classify/workflow/4655

https://github.com/zooniverse/front-end-monorepo/assets/59547/3ede11b6-cb1e-4c2f-b91f-8f185b149c29

eatyourgreens commented 1 year ago

By the way, on a large screen this workflow also has the problem of the subject image overflowing out of the viewport.