Page MenuHomePhabricator

Merge Page Preview and Reference Preview preferences
Closed, ResolvedPublic2 Estimated Story Points

Description

Summary
Page Preview preferences (existing under Preferences > Appearance > Reading preferences) will be merged with Reference Preview preferences (currently under Preferences >
Beta features). This will create a single 'Previews' preference, in the same location as the current Page preview preference.
Note, that this will only be implemented on small default wikis (tbd), so the beta preference settings must be preserved for the remaining wikis until the feature is deployed to all wikis. The currently planned release date for small default is March 10, 2021.

Requirements

  • A single preference enables/disables both Page Previews and Reference Previews at the same time.
  • Page Previews user preference should be respected so that:
    • everyone that has pagepreviews off, has the joint preference turned off
    • everyone that has in on, has the joint preference turned on
    • everyone from deployment date has the joint preference turned on by default
  • (see table below) If the user has the NavPopups gadget enabled, which hides both features, it does not change a users setting but visibly greys out the preference and adds a message to disable the gadget to user the features. If the user has RefTooltips enables (or the wiki has RefTooltips enabled by default), the preference remains usable and is not greyed out, but a message is added to indicate that the gadget has to be disabled to use RefPreviews. The hiding behavior for RefPreviews is covered in another ticket: T265872: Disable ReferencePreviews when gadget is detected
  • The merged Preview preference is editable in three different locations:
    • Logged in users:
    • Appearance preference page (This ticket adjusts the wording to reflect the joint preference in the existing location)
    • The cog-wheel/pop-up Ref Previews, implemented in this ticket T234205: Add cog wheel to the popup to disable ReferencePreviews. For the current ticket, adjust the wording to reflect the joint preference for the existing pop up for Page Previews as shown below.
    • Anonymous users:
    • Cog-wheel pop-up that saves the preference via a cookie

Mocks

current Page Previewsmerged Previews (text below preference changes based on situation, see below. No text below if no gadgets are enabled)

Note: the merged preview dialog/pop-up should use current OOUI dialog components. As mentioned in T266627: Page Previews setting dialog looks scuffed the current button is outdated.

User settings (backend): Preference setting

GadgetPagePreviews SettingJoint preference settingMessage (shown below the standard preference text based on which gadget is enabled)
Nav pop ups enabledEnabledJoint preference enabled, greyed out, not clickable (current behaviour)You have the Navigation popups gadget enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadget may a have slightly different name. If you continue to experience issues, please review your global gadget settings and user scripts.
" "DisabledJoint preference disabled, greyed out, not clickable (current behaviour)" "
RefTooltips enabledEnabledJoint preference enabled, not greyed out and clickable to turn page previews on and off, new message about half of the preference being disabled by gadgetYou have the Reference Tooltips gadget enabled, so you won’t see reference previews but will still see page previews. Depending on your wiki, the gadget may a have slightly different name. If you continue to experience issues, please review your global gadget settings and user scripts.
" "DisabledJoint preference disabled, not greyed out and clickable to turn page previews on and off, new message about half of the preference being disabled by gadget" "
Both gadgets enabledEnabledJoint preference enabled, greyed out, not clickable (current behaviour)You have the Navigation popups and Reference Tooltips gadgets enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadget may a have slightly different name. If you continue to experience issues, please review your global gadget settings and user scripts.
" "DisabledJoint preference disabled, greyed out, not clickable (current behaviour)" "
  • For all of the above messages, the names of gadgets should be links which take you to the relevant section on the gadget preferences tab.

Event Timeline

Lena_WMDE updated the task description. (Show Details)
Lena_WMDE renamed this task from [DRAFT} Merge Page Preview and Reference Preview preferences to Merge Page Preview and Reference Preview preferences.Oct 19 2020, 9:53 AM
Lena_WMDE set the point value for this task to 8.
Lena_WMDE updated the task description. (Show Details)
Lena_WMDE changed the point value for this task from 8 to 5.

I would like to try untangling today's confusion again:

  • With Reference Previews, the Popups extension now implements two types of popups. Before, it was only one type, Page-Previews.
  • A consequence of this is that several messages, as well as the name of the extension should be more generic and not say "page previews" any more. That's already covered above.
  • There are two different gadgets that cause conflicts.
    1. Navigation-Popups-Gadget conflicts with both popup types. Therefor the Popups extension disables itself entirely.
      • This is implemented as a "magic" flag that is independent from the user's preference. The preference is untouched. It's current state (enabled or disabled) is still visible.
      • The user could still change the preference, but that would have no effect as long as the gadget is enabled. Therefor it is grayed out.
      • Note this is not a technical restriction but only done to help the user understand what's going on.
    2. The ReferenceTooltips gadget causes a partial conflict only with the Reference Previews part of the Popups extension, but not with the Page-Previews part.
      • Again, there is a "magic" flag (done via T265872), but this one disables only ReferencePreviews, not PagePreviews. Again, this is is independent from the user's preference.
      • The user can still change the preference, and this still has an effect: It enables/disabled PagePreviews. Graying the preference out would block the user from using it in this meaningful way.
      • What's missing in this scenario is a hint about the conflict. This can be done in the line of text below the preference.

Change 661753 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/Popups@master] [WIP] Combine page and reference preview preferences

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

Page Previews doesn't appear to make use of OOUI so adjusting the settings popup to match/use OOUI elements should be done in a separate task.

Andrew-WMDE added a subscriber: Andrew-WMDE.

@Lena_WMDE @ECohen_WMDE

I have three issues to discuss, that came up from the review on the patch:

  1. The descriptive text the joint setting in the patch will be altered to Get quick previews of a topic or reference while reading there was a discissuion started on a patch that we might rather use something different word instead of topic for example link. See also [1]
  1. The info text shown when you have both gadgets enabled is:
You have the Navigation popups and Reference Tooltips gadgets enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadget may a have slightly different name. If you continue to experience issues, please review your global gadget settings and user scripts.

Reference tooltips alone does not hard block the whole feature so the more important part here would be Navigation popups so that users generally are able to enable previews. The idea would be to "just show the text for the Navigation popups gadget here.

You have the Navigation popups gadget enabled, so you won't see previews provided by this feature. Depending on your wiki, the gadget may a have slightly different name. If you continue to experience issues, please review your global gadget settings and user scripts.

If they disable that gadget they will be able to see the overall feature enabled again and can also still the hint for the missing reference previews if they wonder why they are not working. See also [2]

  1. There's a way to extract the "local" name of the gadgets so we could ( as part of this patch or as a follow up ) replace the generic name in the messages and also get rid of the hint depending on your wiki, the gadget may a have slightly different name. Doing it with this ticket would spare work for translators that need to translate all the stuff. Doing it in an extra ticket could be more transparent and would avoid stretching the work done here. See also [3]

[1] https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Popups/+/661753/7/i18n/en.json#11
[2] https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Popups/+/661753/7/i18n/en.json#27
[3] https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Popups/+/661753/7/i18n/en.json#29

Thanks @WMDE-Fisch for summing up our open questions from the code review. Here are my two cents:

  1. I think the term "link" does fit fine.
  2. I don't know if this will happen in practice, but if a user has both gadgets enabled and the message only highlights one as suggested here, it might result is some frustration, when the user deactivates the one mentioned and nothing appears. Only a second look in the settings will resolve this then. So I would display both.
  3. Saving translator energy might be worth doing it in this ticket.

Thanks for moving the discussion to the ticket @WMDE-Fisch !

  1. This wording came directly from the current page previews setting. Since I'm sure some thought went into it, I would prefer not to change it (and have to open a discussion about it). Please use the suggested descriptive text as written in the ticket.
  2. I don't think it adds much clarity for the user. It could also be frustrating to have to switch back and forth to disable gadgets twice, if you want to use the whole feature. The current text makes it clear that both gadgets interfere with the setting and would both have to be turned off to fully use it. Therefore, please use the text as written in the ticket.
  3. This is a great suggestion. This would make it easier to identify the conflicting gadget and would shorten the text - win/win. Please go ahead!

Also just to highlight, for point 3 - please also link to the gadgets in the gadget tab from the message as per the requirement in the ticket:

  • For all of the above messages, the names of gadgets should be links which take you to the relevant section on the gadget preferences tab.

Also just to highlight, for point 3 - please also link to the gadgets in the gadget tab from the message as per the requirement in the ticket:

  • For all of the above messages, the names of gadgets should be links which take you to the relevant section on the gadget preferences tab.

Unfortunately this seems to be not possible at the moment. We can just get users to the "Gadgets" tab of the preferences. There's no good way to jump to a section there or a specific gadget.

Lena_WMDE changed the point value for this task from 5 to 2.Feb 17 2021, 9:32 AM
  1. This is a great suggestion. This would make it easier to identify the conflicting gadget and would shorten the text - win/win. Please go ahead!

Seems like we cannot get the descriptive name for gadgets on their individual wiki projects. It's part of a longer sentence and currently there's no reliable way to get the gadgets name from there. :-(

Change 661753 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Combine page and reference preview preferences

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

WMDE-Fisch moved this task from Demo to Done on the WMDE-TechWish-Sprint-2021-02-17 board.

Thanks @Amire80 for catching that! It is indeed a mistake and we will update it prior to release.