Page MenuHomePhabricator

Load template page favorite button via SkinTemplateNavigation hook
Closed, DeclinedPublic

Description

Currently we add the favorite button on template pages by inserting it after the watchstar element, entirely in the frontend. Instead of this, we should add a placeholder element via the SkinTemplateNavigation__Universal hook, and then replace/augment that element once it's loaded.

This will make it simpler to target, but mainly will avoid the layout moving after the ext.templateData.templateDiscovery module has loaded.

Event Timeline

Change #1164705 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Add favorite button portlet in PHP

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

Change #1164705 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Add favorite button portlet in PHP

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

The last part here is to fix the button's missing blue border on Vector. There are other related issues that have come about as part of this, tracked separately:

Change #1167996 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/TemplateData@master] Always show favorite button as an anchor

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

Change #1167996 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] Always show favorite button as an anchor, and fix for MonoBook

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