Page MenuHomePhabricator

Deprecate Skin::addToBodyAttributes in favor of OutputPageBodyAttributes hook
Closed, ResolvedPublic

Description

OutputPage::headElement adds attributes to the body element via 2 methods - a hook and skin.

I'd like to settle on the hook here to make it more obvious where these attributes are coming from and deprecate the addToBodyAttributes method.

https://codesearch.wmflabs.org/search/?q=addToBodyAttributes&i=nope&files=&repos=

AC

  • Vector updated to use hook (with check against skin)
  • Minerva updated to use hook (with check against skin)
  • Remove the Skin::addToBodyAttributes method but call it with a deprecation notice if the method exists. (Note: nothing seems to use parent:: so this should be fine)

Event Timeline

Jdlrobson renamed this task from Deprecate Skin::addToBodyAttributes in favor of OutputPageBodyAttributes to Deprecate Skin::addToBodyAttributes in favor of OutputPageBodyAttributes hook.Jun 17 2020, 6:04 PM
Jdlrobson added a subscriber: Ammarpad.

Change 606431 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/skins/Vector@master] Vector: Use OutputPageBodyAttributes hook to add body attributes

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

Change 606431 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Vector: Use OutputPageBodyAttributes hook to add body attributes

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

Change 606546 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/skins/MinervaNeue@master] Minerva: Use OutputPageBodyAttributes hook to add body attributes

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

Change 606653 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Deprecate using Skin method to add body attributes.

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

Change 606546 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Minerva: Use OutputPageBodyAttributes hook to add body attributes

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

Change 606653 merged by jenkins-bot:
[mediawiki/core@master] Deprecate using Skin method to add body attributes.

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

Jdlrobson updated the task description. (Show Details)