Page MenuHomePhabricator

[Dev] Allow extensions to update the footer without resorting to SkinTemplateOutputPageBeforeExec hook
Closed, ResolvedPublic

Description

NOTE: This blocks T251212, which blocks simplifying a lot of the Vector code. On the long term it should save us problems by keeping the footer contract stable and consistent across all the skins we maintain.

The MobileFrontend and WhoIsWatching extensions make modifications to the footer. This is achieved via an incredible amount of indirection passing data between BaseTemplate and SkinTemplate as well as side effects from hooks. This makes it difficult to safely modify parts of the skin code that we need to refactor as part of desktop refresh. There's an opportunity to simplify all this code so it's safer to reason with.

Acceptance criteria

Sign off steps

  • A patch exists for WhoIsWatching (used by 3rd parties) to use the new hook for generating its own footer.

Event Timeline

Jdlrobson created this task.May 4 2020, 7:35 PM

Change 592791 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] Provide a more direct mechanism for extensions to update the footer

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

Change 594309 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Fix the Minerva footer

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

Change 594311 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Use new SkinGetFooterLinks hook for footer modifications

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

Jdlrobson renamed this task from Dev: Allow extensions to update the footer without resorting to SkinTemplateOutputPageBeforeExec hook to [Dev] Allow extensions to update the footer without resorting to SkinTemplateOutputPageBeforeExec hook.May 4 2020, 11:22 PM
Jdlrobson triaged this task as Medium priority.
Jdlrobson updated the task description. (Show Details)

Change 594811 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] Allow modification of the footer directly

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

Change 592791 abandoned by Jdlrobson:
Provide access to Footer links from Skin.php

Reason:
See https://gerrit.wikimedia.org/r/#/c/mediawiki/core/ /594811

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

Change 594309 abandoned by Jdlrobson:
Fix the Minerva footer

Reason:
Avoiding for now...

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

Jdlrobson updated the task description. (Show Details)May 7 2020, 11:32 PM
Restricted Application added a subscriber: Masumrezarock100. · View Herald TranscriptMay 7 2020, 11:32 PM

Change 596247 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/WikimediaMessages@master] Update footer additions to use modern hooks

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

Change 596277 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Use AddFooterLink hook for code of conduct and contact links

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

Change 594811 merged by jenkins-bot:
[mediawiki/core@master] SkinTemplate: Allow modification of the footer directly

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

Jdlrobson updated the task description. (Show Details)May 14 2020, 4:58 PM
Jdlrobson updated the task description. (Show Details)May 14 2020, 6:13 PM
Jdlrobson updated the task description. (Show Details)May 14 2020, 6:17 PM

Change 594311 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] MobileFrontend uses SkinAddFooterLinks hook

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

Jdlrobson closed this task as Resolved.EditedMay 14 2020, 8:37 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Volker_E.

T60137 and T252725 capture the remaining work. Thanks @Volker_E

Change 596247 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] Update footer additions to use modern hooks

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

Change 596277 merged by jenkins-bot:
[operations/mediawiki-config@master] Use AddFooterLink hook for code of conduct and contact links

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