Page MenuHomePhabricator

Should be possible to print breadcrumbs above the heading to avoid reflows on Wikivoyage
Closed, ResolvedPublic5 Story Points

Description

In Wikivoyage the heading is substituted by a page banner. This leads to breadcrumbs appearing below the heading as they currently render in the sub heading.

We never resolved this issue in the discussion here: https://en.wikivoyage.org/wiki/Wikivoyage:Travellers%27_pub#Breadcrumb_menu_and_map_icon_dropping_below_the_banner

We could make it possible to configure the extension so that breadcrumbs can be displayed above the heading with a bit of work, but we should work out what the desired behaviour is before pushing ahead with this.

In the interim a user script has been working around this problem.

Solution

We'd need to update the Geocrumbs extension so that it can output above the banner. It so happens that the hook that inserts the banner (onBeforePageDisplay) runs after the hook that adds the breadcrumbs (onOutputPageParserOutput).

https://github.com/wikimedia/mediawiki-extensions-GeoCrumbs/blob/master/GeoCrumbs.class.php#L78

Currently the hook makes use of sitesubtitle - it would need to be configured to instead to use

$out->prependHTML();

to append before the banner.

See:
https://github.com/wikimedia/mediawiki-extensions-WikidataPageBanner/blob/master/includes/WikidataPageBanner.hooks.php#L103

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task to Backlog on the GeoCrumbs board.
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 24 2015, 6:18 PM
Jdlrobson triaged this task as High priority.Sep 24 2015, 6:18 PM
Jdlrobson lowered the priority of this task from High to Normal.Oct 1 2015, 5:40 PM
Jdlrobson set Security to None.
Jdlrobson updated the task description. (Show Details)Oct 5 2015, 7:41 PM
Jdlrobson added a subscriber: Moushira.

There's a JS hack now in place. Would be good to work out a way forward for this. @Moushira can you help work out what the community wants here? I'm a little stretched right now.

Please fix the hack. The tool links below Special:Contributions header is now gone.

Stryn added a subscriber: Stryn.Oct 13 2015, 4:27 PM

"We never resolved this issue in the discussion here: https://en.wikivoyage.org/wiki/Wikivoyage:Travellers%27_pub#Breadcrumb_menu_and_map_icon_dropping_below_the_banner"

Did we resolve what we want to do with this?
@Jdforrester-WMF is this on your team's radar?

Legoktm raised the priority of this task from Normal to High.Jul 20 2016, 3:31 AM
Legoktm added a project: Wikidata-Page-Banner.
Legoktm added a subscriber: Legoktm.

This is not an issue in GeoCrumbs, it is using the normal method of setting the subtitle. If the subtitle should be moved somewhere else, that seems like something that WikidataPageBanner needs to do.

The current JS hack causes a very-visible FOUC on every page view, that sucks.

Restricted Application added a project: Wikidata. · View Herald TranscriptJul 20 2016, 3:31 AM

The issue here is that the wikivoyage community want the geocrumbs moved above the title e.g. not inside a subtitle. This is thus a geocrumbs/skin issue.

This issue is also present in Spanish Wikivoyage.

In case I wasn't clear before... the extension is currently programmed to always show breadcrumbs below the title.
The variable Geocrumbs uses has the name subtitle - which is why the breadcrumbs are appearing below the title/banner. (Note the similar https://www.mediawiki.org/wiki/Reading/Web for example)

In WikidataPageBanner the title is within the banner...
... but the community wants the links to appear ABOVE the title.

The hack is still in place on frwikivoyage, making the work of stewards harder.

Jdlrobson renamed this task from Should be possible to print breadcrumbs above the heading to Should be possible to print breadcrumbs above the heading to avoid reflows on Wikivoyage.Apr 24 2018, 3:14 PM
Jdlrobson added a subscriber: TheDJ.
Jdlrobson raised the priority of this task from High to Needs Triage.Apr 24 2018, 3:20 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from To Triage to Triaged but Future on the Readers-Web-Backlog board.
Jdlrobson set the point value for this task to 5.Apr 24 2018, 4:50 PM
ovasileva triaged this task as Normal priority.May 10 2018, 2:51 PM

Change 440003 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/WikidataPageBanner@master] Allow skins to render subtitle after banner

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

Change 440003 merged by jenkins-bot:
[mediawiki/extensions/WikidataPageBanner@master] Allow skins to render subtitle after banner

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

This change will go live on 20th June, at which point the local wiki hacks can be removed. I've left a message on the talk page to communicate this change! https://en.wikivoyage.org/w/index.php?title=MediaWiki_talk%3ACommon.js&type=revision&diff=3531687&oldid=3434655

Jdlrobson closed this task as Resolved.Jun 13 2018, 11:03 PM
Jdlrobson claimed this task.