Page MenuHomePhabricator

Sticky header doesn't show the page title if PAGEBANNER is used
Open, MediumPublic3 Estimated Story PointsBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?: Two different results: at Txikipedia namespace the sticky header simply doesn't show. At portal namespace the search button appears but the title is absent.

What should have happened instead?: it should have the same behaviour.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

ovasileva triaged this task as Medium priority.Apr 25 2022, 8:41 AM
Jdlrobson removed a project: Wikidata.

I flagged this a while ago. The banner replaces the heading element that we use to trigger the sticky header. If we are to fix this, we'd likely want to make a change inside Wikidata-Page-Banner to make sure the heading there is marked up consistently so that Vector's code picks it up.

bwang removed bwang as the assignee of this task.Jun 3 2022, 7:18 PM
bwang added a subscriber: bwang.

Change 802825 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/WikidataPageBanner@master] Add #firstHeading id to banner template

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

Change 802825 merged by jenkins-bot:

[mediawiki/extensions/WikidataPageBanner@master] Add #firstHeading id to banner template

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

Edtadros added a subscriber: Edtadros.

Test Result - Prod

Status:
Environment: euwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

❓ AC1: @ovasileva , I initially thought that what should happen based on the description is that the sticky header would show. However, since I wasn't able to get it to show (even with the param), I'm no longer sure it should show, but rather that they should "both be the same" and not show. What is the expected result?

Screen Recording 2022-06-16 at 4.17.38 PM.mov.gif (556×1 px, 1 MB)

Screen Recording 2022-06-16 at 4.15.36 PM.mov.gif (556×1 px, 2 MB)

I'm still investigating why the sticky header isnt showing. For the first link in the description (https://eu.wikipedia.org/wiki/Txikipedia:Munduko_zazpi_mirariak) I believe its because the sticky header isnt available in that namespace 104. For the second, (https://eu.wikipedia.org/wiki/Atari:Hezkuntza/Lehiaketak/2022/04) I havent found any obvious reason why its not working. I probably have to setup page banners locally to reproduce and debug.

Edit: Ok I figured it out, my previous patch didnt work because the original #firstHeading element was just hidden with CSS, when it really needs to be removed so that there is a unique element to query for for the sticky intersection element

This comment was removed by bwang.

I think this is okay? I'm not entirely sure what the atari namespace is. For Txikipedia - I suppose it would make sense to have the header appear here for consistency with the main namespace. On the other hand, few of the articles here are long enough to make it particularly useful (by design). @Theklan - any thoughts on this one?

Atari is Portal. Is NS 100, and it's used in all Wikimedia projects. Totally related: T303258, where I explain why portals should be also considered by the design team.

I think that for consistency the sticky header should be shown in any page, regardless of the ns.

Change 807219 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] WIP: Add collapsed TOC to sticky header

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

I tagged the wrong task, pls ignore the patch above