Page MenuHomePhabricator

Proofread page: evaluate old-style click to toggle scroll action between zoom/scroll
Open, HighPublicFeature


The old PRP image viewer has the following behaviour:

  • Default: scroll to pan up/down
  • Click to change to scroll-to-zoom
  • Click again to change back to scroll-to-pan

This was very finicky and often took several clicks to work.

Currently, the OSD viewer has the default OSD config: clicking zoom in by one step, scrolling by drag and arrow keys.

We could pretty easily re-implement the old behaviour if that is actually desirable. And if we did, it would probably work much better than it used to.

This could be the default behaviour (like it use to be) or a user preference.

Event Timeline

An alternative is the common idiom Ctrl-scroll to zoom and scroll-to-pan (and Shift-Scroll to pan sideways) which is the system used by GIMP, Inkscape and Firefox.

Please keep away from two handed actions (mouse + keyboard) whenever possible.

High, since this is a fairly major UX point of the page viewer.

Change 740369 had a related patch set uploaded (by Inductiveload; author: Inductiveload):

[mediawiki/extensions/ProofreadPage@master] OSD: Add Ctrl and Shift scroll actions

The current state of the scroll/pan is:

  • Click and drag: pan the image
  • Scroll wheel: zoom the image in and out
  • Ctrl+scroll: pan the image up and down
  • Shift+scroll: pan the image side to side
  • Left click: zoom in one step
  • Shift-left click: zoom out one step

The middle mouse button switches the normal and Ctrl-key modes (so Ctrl-scroll becomes zoom and normal scroll becomes pan). The cursor changes to identify which mode you are in.

Outstanding questions, assuming we keep this approximate system:

  • Middle button or left button to switch scroll/pan modes? While left button did, kind of, work for this at WS in the old viewer, it's different to basically every other image viewer in the world, and not only the OSD-based ones.
  • Should we:
    • add a config option to start in scroll mode rather than zoom mode
    • make it persistent (so it sticks across page loads)
    • Do nothing and just start in zoom mode on every page load (this is what happens now, not by special intent, just by lack of specification and implementation).
    • Do nothing but flip the starting mode to scroll (same as it used to be?) but different to every other viewer in the world

@Inductiveload, none of the above suggestions scroll the content. Were there any problems with the previous arrangement? If not, these changes may entertain and occupy the developers, but don't nothing to help editors. Please don't break something that works. Can I disable the magnifier on the pages I want to work and get back scrolling until this is sorted out and functioning?

@Ineuw there were major technical problems with the old implementation. I didn't implement this change, but I can tell you that it wasn't done for fun, entertainment or or to "occupy" a developer. In fact "occupying" a developer is the last problem we have since we are as critically short of development resources as ever.

Three out of four of the above suggestions (1, 2 and 4) would functionally allow you to scroll the image by default instead of zoom. Do you have a specific preference for which would be best and why? Have you tried a patch demo (the current one is and includes a re-implementation of the old click-to-toggle behavior, with middle-click)?

If the patch demo works for you, it is in theory possible to backport to common.js, since the new system gives fully flexibility to userscripts to set the viewer options.