Page MenuHomePhabricator

Disable Page Previews for anons
Closed, ResolvedPublic2 Estimated Story Points

Description

Context

During T144490, we discovered that if the Page Previews code is delivered to an anon but the experiment is disabled, then they'll see previews. See T144490#2855170 for more detail.

AC

  • Previews are shown if the user is logged in and the user hasn't disabled them.

Event Timeline

bmansurov moved this task from Incoming to Upcoming on the Web-Team-Backlog board.

Change 327194 had a related patch set uploaded (by Phuedx):
Redefine when Page Previews are enabled

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

Change 327195 had a related patch set uploaded (by Phuedx):
Hygiene: Remove experiment-related code

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

Change 327196 had a related patch set uploaded (by Phuedx):
Hygiene: Make mw.popups#isEnabled return boolean

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

Change 327194 merged by jenkins-bot:
Redefine when Page Previews are enabled

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

Change 327195 merged by jenkins-bot:
Hygiene: Remove experiment-related code

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

Change 327196 merged by jenkins-bot:
Hygiene: Make mw.popups#isEnabled return boolean

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

Even with all these patches merged it seems to behave incorrectly for me upon page refresh - I don't see any save to localStorage to make the option persist:

disablepopups.gif (405×809 px, 341 KB)

and anon...

disablepopupsanon.gif (405×809 px, 168 KB)

Given we are in rewrite status I'm a little lost at whether I'm seeing a bug or incomplete code. You may be aware of this but just pointing out just in case...

I'll take a look on Monday. Interestingly, the acceptance tests that I've written for this part of the workflow pass. @Jhernandez: SYN.

@Jdlrobson: I've tested this locally and on our staging server (which I made sure was updated).