Page MenuHomePhabricator

Separate user preferences for Page previews and Reference previews
Open, Needs TriagePublic5 Estimated Story Points

Description

Implement what came out of the investigation documented in T233109: Spike: How should users enable the reference preview feature?:

Separate user preferences for Page Previews and Reference Previews. This will make it possible for users to have both features disabled, both enabled, or one enabled and the other disabled.

Acceptance criteria:

  • The existing setting on the "Appearance" tab should continue to talk about "Page previews" only, not about "popups".
  • The new setting should say something like "enable Reference Previews".
  • The new setting should be directly after the existing one.
  • As long as we are in Beta, the new setting needs to stay on the Beta tab. The new setting on the Appearance tab should already be implemented, but hidden then.
  • The text on the Beta tab needs to be changed: Remove the sentence about "Page Previews must be enabled as well".
  • The existing "Page previews" setting can not disable the extension any more, but only one of the popup types. To achieve this, the check must be moved from the backend (PopupsContext.php) to the frontend (probably in src/index.js).
  • The module should not be loaded when all popup types are disabled.

To do:

  • T235737 The workflow for anonymous users is entirely undefined as of now! It might be that reference previews are always on for anonymous users, or disabled together with page previews.
  • Talk to UX and/or the WMF team formerly working on Page-Previews and ask if it is ok to turn the existing "Enable/Disable" radio buttons into a single checkbox. (Note from @thiemowmde: I remember asking the devs about this. They said this was intentional to give the user something with much more surface area, so it feels much more like a deliberate decision made by the user.)
  • Check if we have a ticket to remove all BetaFeature code when it's not needed any more.
  • Check if we have a ticket to remove the PopupsReferencePreviews feature flag when it's not needed any more. This is especially relevant because this is exposed in JavaScript, and does waste a tiny little bit of our users resources.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 25 2019, 1:39 PM
thiemowmde updated the task description. (Show Details)Sep 30 2019, 11:27 AM
WMDE-Fisch moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2019-09-25 board.
thiemowmde removed WMDE-Fisch as the assignee of this task.Oct 9 2019, 2:15 PM
thiemowmde added a subscriber: WMDE-Fisch.
thiemowmde moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2019-10-09 board.

Change 542117 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] [WIP] Split user preferences for Page and Reference previews

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

Change 542127 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] Make use of User::getBoolOption() where appropriate

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

Change 542140 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] Refactor PopupsHooks for easier removal and/or expansion

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

Change 542150 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] Rename PHP constant for ReferencePreview preference

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

thiemowmde removed thiemowmde as the assignee of this task.Oct 11 2019, 8:09 AM
thiemowmde updated the task description. (Show Details)
thiemowmde moved this task from Doing to Review on the WMDE-QWERTY-Sprint-2019-10-09 board.
thiemowmde updated the task description. (Show Details)Oct 11 2019, 8:28 AM

@Andrew-WMDE, it would be pretty critical if we (the WMDE-Technical-Wishes-Team) could merge the patch https://gerrit.wikimedia.org/r/542117 (along with it's requirements) this week, latest next Monday (21 October). We need it to be in the wmf.3 branch cut that will happen on 22 October, see https://www.mediawiki.org/wiki/MediaWiki_1.35/Roadmap.

Change 542140 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Refactor PopupsHooks for easier removal and/or expansion

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

Change 542117 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Split user preferences for Page and Reference previews

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

thiemowmde updated the task description. (Show Details)
thiemowmde moved this task from Review to Demo on the WMDE-QWERTY-Sprint-2019-10-09 board.

Change 544768 had a related patch set uploaded (by Awight; owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@wmf/1.35.0-wmf.2] Refactor PopupsHooks for easier removal and/or expansion

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

We'll need this message translated in order for the new feature to make sense:
https://translatewiki.net/w/i.php?title=Special:Translations&message=MediaWiki%3APopups-refpreview-beta-feature-description%2Fde

Once the translations are done and the code is merged, we need to refresh the localization cache.

Change 544855 had a related patch set uploaded (by Awight; owner: Awight):
[operations/mediawiki-config@master] Put reference previews back into beta mode on beta cluster

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

Change 544855 merged by jenkins-bot:
[operations/mediawiki-config@master] Put reference previews back into beta mode on beta cluster

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

Mentioned in SAL (#wikimedia-operations) [2019-10-21T11:42:23Z] <awight@deploy1001> Synchronized wmf-config/InitialiseSettings-labs.php: SWAT: [[gerrit:544855|Put reference previews back into beta mode on beta cluster (T233813)]] (duration: 01m 00s)

Smoke testing looks good on the beta cluster, in all 4 combinations of Page Previews / Reference Previews enablement!

Change 542150 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Rename PHP constant for ReferencePreview preference

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

Change 542127 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Make use of User::getBoolOption() where appropriate

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

Change 544768 abandoned by Awight:
Refactor PopupsHooks for easier removal and/or expansion

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