Page MenuHomePhabricator

Page Preview preference should be a checkbox
Closed, ResolvedPublic

Description

Steps to find out

  1. Open preferences on any wiki
  2. See features like MediaViewer or Revision-Slider have got checkbox switch
  3. Only Page-Previews is different as it has got two enable/disable radio buttons
  4. This is not really unified per my opinion and can be confusing a little bit too

Event Timeline

this is about the modal window to disable the page previews.

  • Making it obvious to disable page previews was part of the design criteria
  • We did usertest this part of the feature.. an explicit "disable" is preferred over unchecking a box

Thank you for your suggestion, we would probably need to move over to checkbox later down the line when page previews are more commonplace and people know about it.

To begin with, we would like to retain the disabling model.

There has been some work on T117781: Convert Special:Preferences to OOUI.
With that in, the ToggleSwitchWidget would fulfill both needs as most appropriate widget in the long-term and work for the other two features as well, similar to T169807 already raised.

Nirzar changed the task status from Open to Stalled.Sep 6 2017, 10:11 PM

@Volker_E
Yes. but that would be much later down the line.

I'll note that this is trivial technically, since the radio preference already uses the values 1 for enabled and 0 for disabled, which is the same as a checkbox preference would use for the checked/unchecked state. You can just change 'type' => 'radio' to 'type' => 'check' and the preference works correctly (and doesn't lose the existing user prefs). If this was intentional, then I applaud Popups' devs' foresight :)

So I guess someone needs to decide on the timing, remove some other dead code and unused messages, and possibly adjust the wording to look better with the checkbox (see also T203992: Random italicized text under Reading preferences section on Special: Preferences > Appearance tab).

There has been some work on T117781: Convert Special:Preferences to OOUI.
With that in, the ToggleSwitchWidget would fulfill both needs as most appropriate widget in the long-term and work for the other two features as well, similar to T169807 already raised.

Is there a task about moving Special:Preferences to ToggleSwitchWidget on desktop some time in the future?

Over 2 years later, do we still care about this bug? T117781 is long fixed.

I care, these two radio boxes offend my sensibilities every time I need to toggle the legacy Vector on and off. (Which, by the way, is very reasonably a checkbox.)

Change 637019 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/Popups@master] Use a checkbox for the preference

https://gerrit.wikimedia.org/r/637019

The checkbox looks great. Regarding the copy, I'm realizing that T265709 is coming up so we may want to wait for that and then revise accordingly? In short the current "Page previews" setting will now control reference previews and page previews. The combined feature will simply be called "Previews". cc @Lena_WMDE

In T174726#6607651, @alexhollender wrote:

The checkbox looks great. Regarding the copy, I'm realizing that T265709 is coming up so we may want to wait for that and then revise accordingly? In short the current "Page previews" setting will now control reference previews and page previews. The combined feature will simply be called "Previews". cc @Lena_WMDE

+1, although I think we can probably make the change for now, and then make a quick copy correction once T265709: Merge Page Preview and Reference Preview preferences is out as well (as reference previews are only going out to a small set of test wikis for now)

Change 637019 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Use a checkbox for the preference

https://gerrit.wikimedia.org/r/637019

I can't remember being this excited about a software change.