A preference for hovercards appears on user preferences page
Closed, ResolvedPublic8 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"

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

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

Workflow

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.

bmansurov updated the task description. (Show Details)Dec 2 2016, 9:45 PM
Tbayer added a subscriber: Tbayer.Dec 5 2016, 9:22 PM
pmiazga claimed this task.Dec 8 2016, 4:54 PM
pmiazga updated the task description. (Show Details)Dec 13 2016, 6:33 PM

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

pmiazga updated the task description. (Show Details)Dec 16 2016, 1:46 PM
ovasileva updated the task description. (Show Details)Dec 19 2016, 6:41 PM
ovasileva added subscribers: Moushira, Ckoerner.

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

pmiazga updated the task description. (Show Details)Dec 20 2016, 12:25 AM

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

pmiazga updated the task description. (Show Details)Dec 20 2016, 10:57 PM
pmiazga moved this task from Doing to Code Review on the Reading-Web-Sprint-88-¯\_(ツ)_/¯ board.
phuedx added a subscriber: phuedx.Dec 21 2016, 6:48 AM

@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

The last two AC aren't met. They could be added to rEPOP14bfb67cce2e: WIP: Settings only for anons.

@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.

CKoerner_WMF removed a subscriber: Ckoerner.

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.

phuedx claimed this task.Jan 4 2017, 11:32 AM
phuedx added a subscriber: pmiazga.
Tbayer added a comment.Jan 4 2017, 6:18 PM

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.

@phuedx - created documentation task T154635: Update documentation for changes to preferences page - I have yet to fill in more detail

phuedx added a subscriber: jhobs.

^ Per review from @Jdlrobson and @jhobs.

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

phuedx removed phuedx as the assignee of this task.Jan 17 2017, 9:26 PM
ovasileva closed this task as Resolved.Jan 18 2017, 1:33 AM
ovasileva claimed this task.

tested, all done! Good job everyone!

For the record, this is available to test here: http://reading-web-staging.wmflabs.org.

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

@ovasileva can we re-open please?

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

I will create another task