Page MenuHomePhabricator

Download button showing on namespaces other than the main namespace
Closed, ResolvedPublic2 Story Points

Description

Background

In T177215: Build download button for mobile PDF download, a portion of the acceptance criteria was to only display the button on the article namespace. In implementation however we only excluded it from showing on the MAIN page but it still shows up in pages other than the main namespace and failed to pick up on this mistake within our process.

Acceptance criteria

  • only show the button when the namespace is 0 (NS_MAIN).
  • do not show button on main page

Steps to reproduce

Change has been enabled on https://reading-web-staging.wmflabs.org/
expected: no download button appears on main page
expected: download page only shows on main namespace e.g. not on pages such as Talk:Foo etc..

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 22 2017, 2:25 PM
Jdlrobson renamed this task from Download button showing on namespaces other than the article namespace to Download button showing on namespaces other than the MAIN namespace.Nov 22 2017, 3:55 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson renamed this task from Download button showing on namespaces other than the MAIN namespace to Download button showing on namespaces other than the main namespace.Nov 22 2017, 5:06 PM
ovasileva updated the task description. (Show Details)Nov 22 2017, 5:12 PM
ovasileva set the point value for this task to 2.Nov 22 2017, 5:15 PM

Change 393852 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Disable download button in all namespaces except main

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

pmiazga added a subscriber: pmiazga.EditedNov 29 2017, 1:29 PM

I'm against hardcoding this kind of stuff in the code. I'm more than sure that after deploying that to production we will get many questions why download button is not available on some pages.

I would introduce a config variable, it doesn't hurt us, overhead is minimal, and it gives us flexibility. Also we could get read of "on/off" toggle just pass an empty namespaces array

New patchset is up, repurposing the existing config flag.

Looks good, there are some issues with selenium tests not related to that task. I'll keep my eye on the Jenkins results and move task to needs QA when the patch gets merged

Change 393852 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Disable download button in all namespaces except main

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

Jdlrobson reassigned this task from Jdlrobson to ABorbaWMF.Nov 30 2017, 12:06 AM

Over to you Anthony.

Jdlrobson updated the task description. (Show Details)Nov 30 2017, 12:06 AM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)

I found this page on Staging. I don't know if it counts as a namespace, but there is no print button present.

ovasileva closed this task as Resolved.Dec 5 2017, 11:14 AM

all done!