Page MenuHomePhabricator

A preference for hovercards appears on user preferences page
Closed, ResolvedPublic8 Estimated Story Points

Description

Story

As a logged-in user, I want the ability to turn hovercards on and off once they are in stable, so that I can see the feature when I want to

Description

Build logged-in user settings

Acceptance Criteria

Users will be able to specify whether they want hovercards on or off via a section within the user preferences page. This will contain the following:

  • The work should be done in the mpga branch.
  • Section title: Reading Preferences
  • Item title: Page Previews
  • Subtitle: Get quick previews of a topic while reading an article
  • Radio button: Enable
    • Selecting Enable and Save will turn page previews ON
    • Selecting Enable and not saving will do nothing
  • Radio button: Disable
    • Selecting Disable and Save will turn page previews OFF
    • Selecting Disable without saving will do nothing
  • Note: when hovercards are disabled for logged-in users, the “Enable Previews” link will NOT appear
  • Must be feature flagged and off until move to stable
  • Allow user settings to be inherited by beta - if user had page previews enabled in beta, enable by default
  • Order - user preference for page previews should appear immediately after "Skin"

preferences.png (692×1 px, 211 KB)

  • if I'm a logged in user, the settings cog should link to the "appearance" tab in user preferences.

flow.png (1×3 px, 1023 KB)

  • the "enable previews" link on the bottom of the page will not appear
  • this should be part of the rewrite branch

Workflow

Screen Shot 2016-10-27 at 2.51.42 PM.png (351×785 px, 33 KB)

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
ovasileva set the point value for this task to 8.Nov 29 2016, 5:37 PM

If necessary we can split this up into two tasks:

  1. Adding and displaying the user preference
  2. Integration - Reading and honouring the user preference.

Is this task stalled till post rewrite?

Maybe not, but we should definitely base this work on the mpga branch that was introduced for the rewrite task.

Change 327041 had a related patch set uploaded (by Pmiazga):
Introduce Popups Opt-In option on user preferences page

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

First patch is now +2ed.
Opting in exposes the following variable in JS:

mw.user.options.get('popups-enable')

So we should be able to easily check that in our logic to determining whether popups is enabled or not.

Change 327041 merged by jenkins-bot:
Introduce Opt-In option on user preferences page

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

Change 327696 had a related patch set uploaded (by Pmiazga):
[WIP] Implement necessary wiring for preferences

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

ovasileva added subscribers: Moushira, Ckoerner.

@ovasileva to check with @Ckoerner and @Moushira on order of preferences page

Change 327696 merged by jenkins-bot:
Implement necessary wiring for preferences

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

Change 328430 had a related patch set uploaded (by Pmiazga):
Inject preference option directly after skin select

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

Change 328431 had a related patch set uploaded (by Pmiazga):
ext.popups module should be loaded for anon users

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

@ovasileva: AFAICT rEPOPd6aa349536d2: Inject preference option directly after skin select moves the Reading preferences preferences immediately underneath the Skin preferences. Have we checked that this is OK?

Change 328431 merged by jenkins-bot:
ext.popups module should be loaded for anon users

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

@phuedx, @pmiazga - discussed with @Ckoerner and so long as we update the appropriate documentation before release for the main wikis, we think we're good to go with the order of the preferences (as second under skin)

@ovasileva: OK. Let's create a task covering updating the documentation as part of the Code Review -> Sign Off steps.

Change 328430 merged by jenkins-bot:
Inject preference option directly after skin select

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

Change 328500 had a related patch set uploaded (by Phuedx):
Send blob to everyone

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

Change 328674 had a related patch set uploaded (by Phuedx):
Make settings reducer control footer link

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

Change 328675 had a related patch set uploaded (by Phuedx):
Clicking cog sends user to Special:Preferences

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

@Jdlrobson: I've re-ordered the changes per your request.

Considering that we already track disable events (so far only from the separate dialog linked from the cards themselves) in the Popups schema, it would be good to add events there for these new enables/disables coming from the user preferences.

Change 332151 had a related patch set uploaded (by Phuedx):
Hygiene: Rename SchemaPopupsSamplingRate

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

Change 332152 had a related patch set uploaded (by Phuedx):
Forward PopupsBetaFeature to the client

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

Change 332151 merged by jenkins-bot:
Hygiene: Rename SchemaPopupsSamplingRate

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

Change 332152 merged by jenkins-bot:
Forward PopupsBetaFeature to the client

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

Change 328675 merged by jenkins-bot:
Vary cog click behavior

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

Change 328500 merged by jenkins-bot:
Send blob to everyone

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

Change 328674 merged by jenkins-bot:
Hygiene: Make settings reducer control footer link

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

ovasileva claimed this task.

tested, all done! Good job everyone!

The tip text is appearing on left and a unreadable font size, can we match the alignment and fontsize with zeplin spec?

@Nirzar - do we still need to reopen or can this also be tracked under a separate task?