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

Mouse wheel zoom refactor #2075

Open srallen opened 3 years ago

srallen commented 3 years ago

Package lib-classifier

Describe the bug

Reported from the beta test for the transcription task and originally noted in #1978. The mouse wheel triggers zoom unexpectedly when using the pop-up context menus for the text sub-task or viewing previous annotations outside of the image area. This gif demonstrates it:

zoom-bug

But even if this bug didn't exist, the initial comments also mentioned it being frustrating if just scrolling the window and since the image takes up a large space, that accidentally zooming is a common occurrence in general.

To Reproduce

Use the transcription text beta project with the dev classifier: https://localhost:8080/?project=11300&env=production

Expected behavior

Mouse wheel zoom should only happen within the image bounds and only when the user wants it to zoom. Discussion with @snblickhan resulted in the decision that mouse wheel zoom will be disabled for now. This is not a regression to parity with either PFE or ASM since neither of those supported it either. Once disabled, we'll have time to do a refactor on the concept. My idea of going forward is:

1) Update the VisXZoom component to only mouse wheel zoom when it's specifically enabled. Inspiration for this UX is from Google Maps. Mouse wheel is enabled by keyboard command, but we could consider reusing the already built zoom enable button for scatter plots or both options. 2) Try Swapping SVGPanZoom for VisXZoom with the image viewer. We shouldn't be maintaining two variants of the same functionality. The mouse wheel zoom that VisXZoom supports is actual zoom to point of the cursor whereas the SVGPanZoom just zooms the center. Typically the UX with mouse wheel is zoom to point, and likely this will be the user expectation if we do support it.

eatyourgreens commented 3 years ago

Can mouse wheel zoom also be turned off in drawing mode, like it is for PFE? See this example here: https://www.zooniverse.org/projects/psmsl/uk-tides/classify By default, the mouse wheel scrolls the page, unless you select the pan/zoom button, when it switches to zoom in/out.

eatyourgreens commented 3 years ago

There's overlap here with Engaging Crowds too, where we want to be able to zoom into a column of a table, then keep zoom fixed and scroll up and down the column.

Compare zooming with the mouse to transcribe a specific column for HMS NHS on PFE https://master.pfe-preview.zooniverse.org/projects/msalmon/hms-nhs-the-nautical-health-service/classify?env=production and the new classifier https://www.zooniverse.org/projects/msalmon/hms-nhs-the-nautical-health-service/classify/workflow/16852/subject-set/82738

eatyourgreens commented 3 years ago

PFE does have wheel zoom. See https://github.com/zooniverse/Panoptes-Front-End/pull/3756. Based on the linked Talk thread, in that PR, I think it's being used in Notes from Nature, at least. It should work on any workflow that has zoom enabled.

srallen commented 3 years ago

Is anyone aware of this / use it? I had no idea nor how it was enabled since nothing visually changes to indicate this. I think we're deprecating the configuration in the lab since it's commonly enabled (I don't recall the numbers right now, but we can get them). But we do now have UI to let the volunteer control the behavior during classification, at least for the more complex subject viewers. I think my suggestion still fits to continue to expand on that for this use case. We need improved UI/UX so what's going to happen is predictable for the volunteer.

eatyourgreens commented 3 years ago

We got some complaints when it broke in Chrome, so it's in use by some volunteers. It's enabled when the pan/zoom button is enabled in the toolbar. It's ages since I looked at it, but I think the button changes colour.

srallen commented 3 years ago

I had a look at the PFE dev classifier as a reference before I opened this issue and I didn't see any indication of it. It's not something that either me or Sam was aware of, so I do think we have a discoverability problem with it.

eatyourgreens commented 3 years ago

Yeah, it's not at all obvious. I had a play around with the dev classifier, and wheel zoom is enabled when the zoom button (which is not obviously a zoom button) is blue. Screenshot of the dev classifier with pan/zoom mode selected and the subject zoomed in.

It's been in PFE since about a year after we launched the new platform. I didn't realise it was that old. https://github.com/zooniverse/Panoptes-Front-End/pull/2199

srallen commented 3 years ago

The pan button has the blue background. This just indicates the toggle between normal cursor and pan/zoom. Nothing indicates that mouse wheel would work since the cursor changes to pan as well.

denslowm commented 2 years ago

Hi, We (Notes from Nature Team) are interested in this issue because a few of our volunteers mentioned that mouse zooming no longer worked when they tried projects with the new interface (FEM). I don't use a mouse, but I believe the Mac trackpad works in a similar fashion. Some volunteers already know that Notes from Nature will move to FEM, so they expressed concern. At this point, I mostly wanted to confirm that it's used in our current Org. and we've heard some comments about it already.