Page MenuHomePhabricator

Sticky header: Sticky header should not appear on certain namespaces
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

The sticky header provides a certain set of tools focused on article pages and other mainspaces focused on content creation. At this point, we will not support special use cases for the set of pages listed below, however, we will iterate on this in the future

Acceptance criteria

  • Sticky header should be disabled on the following namespaces and pages:
  • Talk
  • File
  • Special
  • TimedText
  • Diff pages
  • History pages
  • Wikitext editor
  • VE
  • Enabled on
  • Main
  • User
  • Wikipedia
  • Template
  • Module
  • Help
  • Category
  • Portal
  • If the namespace above is not listed, it should be disabled
  • Checks are hardcoded and performed in JavaScript (for now)

Developer notes

Configuration can be expensive, so for now I would recommend hard coding this behaviour inside the JavaScript. Namespace is available in mw.config.get('wgNamespaceNumber') and action in mw.config.get('wgAction')

In future if we want/need to generalize this, I'd suggest refactoring and generalising the existing code relating to max width, but that should be considered out of scope for now.

QA Results - Beta

ACStatusDetails
1T290347#7378054
2T290347#7378054

QA Results - Prod

ACStatusDetails
1T290347#7378072
2T290347#7378072

Event Timeline

Jdlrobson updated the task description. (Show Details)

Sticky header should be disabled on the following namespaces and pages:

@alexhollender @ovasileva Is there any correlation between this feature request and the existing max-width?

For example, looking at Module and TimedText I'm now wondering if the max-width makes sense on those namespaces:
https://en.wikipedia.org/wiki/TimedText:Requiem_for_a_Dream_rapid_cuts.ogv.en.srt

The max-width is already disabled on all those pages except talk, file

I ask, as I wonder if the existing config could be reused here, with some additional overrides for talk, file, and main page.

Sticky header should be disabled on the following namespaces and pages:

@alexhollender @ovasileva Is there any correlation between this feature request and the existing max-width?
For example, looking at Module and TimedText I'm now wondering if the max-width makes sense on those namespaces:
https://en.wikipedia.org/wiki/TimedText:Requiem_for_a_Dream_rapid_cuts.ogv.en.srt

The max-width is already disabled on all those pages except talk, file

I ask, as I wonder if the existing config could be reused here, with some additional overrides for talk, file, and main page.

I think the current correlation is mostly circumstantial. In the future, our plan would be to have most or all pages fit within the max width, although that might not be the case for the sticky header. That said, I think re-using could potentially be an option so long as we can easily make overrides in the future of moving certain namespaces into and out of the two individual groups.

Jdlrobson updated the task description. (Show Details)
ovasileva updated the task description. (Show Details)

hi @ovasileva -- Module is listed in both enable + disable lists in the task description -- can you clarify which one it should be?

Change 721404 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/skins/Vector@master] Restrict sticky header to specified namespaces

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

hi @ovasileva -- Module is listed in both enable + disable lists in the task description -- can you clarify which one it should be?

Fixed now. Module should be enabled.

cjming moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.
cjming subscribed.

thanks @ovasileva -- one more Q -- should sticky header be visible on Edit pages?

thanks @ovasileva -- one more Q -- should sticky header be visible on Edit pages?

Hi @cjming - no, no sticky header in either the text editor or VE (cc @alexhollender on what the transition there should look like)

Change 721404 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Restrict sticky header to specified namespaces

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

✅ AC1: Sticky header should be disabled on the following namespaces and pages:

Talk
Screen Recording 2021-09-25 at 12.08.29 PM.mov.gif (668×2 px, 3 MB)
File
Screen Recording 2021-09-25 at 12.09.39 PM.mov.gif (668×2 px, 1 MB)
Special
Screen Recording 2021-09-25 at 12.10.34 PM.mov.gif (668×2 px, 1 MB)
TimedText
Screen Recording 2021-09-25 at 12.11.39 PM.mov.gif (668×2 px, 3 MB)
Diff pages
Screen Recording 2021-09-25 at 12.18.00 PM.mov.gif (668×2 px, 1 MB)
History pages
Screen Recording 2021-09-25 at 12.18.30 PM.mov.gif (668×2 px, 2 MB)
Wikitext editor
Screen Recording 2021-09-25 at 12.19.13 PM.mov.gif (668×2 px, 2 MB)
VE
Screen Recording 2021-09-25 at 12.23.04 PM.mov.gif (668×2 px, 2 MB)

✅ AC1: Sticky header should be enabled on the following namespaces and pages:

Main
Screen Recording 2021-09-25 at 12.04.17 PM.mov.gif (668×2 px, 2 MB)
User
Screen Recording 2021-09-25 at 12.04.44 PM.mov.gif (668×2 px, 1 MB)
Wikipedia
Screen Recording 2021-09-25 at 12.05.15 PM.mov.gif (668×2 px, 2 MB)
Template
Screen Recording 2021-09-25 at 12.05.44 PM.mov.gif (668×2 px, 1 MB)
Module
Screen Recording 2021-09-25 at 12.06.10 PM.mov.gif (668×2 px, 2 MB)
Help
Screen Recording 2021-09-25 at 12.06.52 PM.mov.gif (668×2 px, 1 MB)
Category
Screen Recording 2021-09-25 at 12.07.21 PM.mov.gif (668×2 px, 1 MB)
Portal
Screen Recording 2021-09-25 at 12.07.47 PM.mov.gif (668×2 px, 1 MB)
Edtadros subscribed.

Test Result - Prod

Status: ❌ Fail
Environment: enwiki, commons
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

✅ AC1: Sticky header should be disabled on the following namespaces and pages:

Talk
Screen Recording 2021-09-25 at 12.35.08 PM.mov.gif (668×2 px, 2 MB)
File
Screen Recording 2021-09-25 at 12.42.21 PM.mov.gif (668×2 px, 2 MB)
Special
Screen Recording 2021-09-25 at 12.37.22 PM.mov.gif (668×2 px, 1 MB)
TimedText
Screen Recording 2021-09-25 at 12.38.01 PM.mov.gif (668×2 px, 1 MB)
Diff pages
Screen Recording 2021-09-25 at 12.38.45 PM.mov.gif (668×2 px, 1 MB)
History pages
Screen Recording 2021-09-25 at 12.40.10 PM.mov.gif (668×2 px, 1 MB)
Wikitext editor
Screen Recording 2021-09-25 at 12.43.03 PM.mov.gif (668×2 px, 2 MB)
VE
Screen Recording 2021-09-25 at 12.43.19 PM.mov.gif (668×2 px, 2 MB)

❌ AC1: Sticky header should be enabled on the following namespaces and pages:

Main
Screen Recording 2021-09-25 at 12.26.40 PM.mov.gif (668×2 px, 3 MB)
User
Screen Recording 2021-09-25 at 12.27.37 PM.mov.gif (668×2 px, 533 KB)
Wikipedia
Screen Recording 2021-09-25 at 12.28.41 PM.mov.gif (668×2 px, 1 MB)
Article Wizard fails
Screen Recording 2021-09-25 at 12.28.58 PM.mov.gif (668×2 px, 1 MB)
Template
Screen Recording 2021-09-25 at 12.31.17 PM.mov.gif (668×2 px, 1 MB)
Module
Screen Recording 2021-09-25 at 12.32.10 PM.mov.gif (668×2 px, 825 KB)
Help
Screen Recording 2021-09-25 at 12.33.17 PM.mov.gif (668×2 px, 1 MB)
Category
Screen Recording 2021-09-25 at 12.33.50 PM.mov.gif (668×2 px, 1 MB)
Portal
Screen Recording 2021-09-25 at 12.34.11 PM.mov.gif (668×2 px, 1 MB)

@Jdlrobson The sticky header does show up, but the text is not what is expected. If the text is not in scope of this task I can pass this and move it to Ready for Signoff, assuming there is (or will be) a task for the header text.

@Edtadros this can't be tested on production, only on https://patchdemo.wmflabs.org/wikis/7d133396d0/wiki/New_York_Yankees

The querystring flag trumps all the logic here.

ovasileva claimed this task.

Looks good, resolving