Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

[EPIC] Deprecate the SkinTemplate hooks and simplify the skin<->extension contract.
Closed, ResolvedPublic

Description

Skin developers currently have to deal with high levels of complexity to ensure they integrate correctly with all extensions. This increases the risk of regressions during feature development on skins. The proposal is to reduce the amount of hooks that extensions can integrate with to reduce this risk.

From now it is proposed that all hooks will be run inside Skin.php.

Having less hooks will simplify how we construct menus.
https://www.mediawiki.org/wiki/User:Jdlrobson/Skins_for_extension_developers#Modifying_Menus

Acceptance criteria

  • The SkinTemplateOutputPageBeforeExec has been deprecated (T60137)
  • The SkinTemplatePreventOtherActiveTabs hook is deprecated (unused)
  • The SkinTemplateTabAction hook is deprecated (unused)

Sign off steps

The 3 important hooks run inside SkinTemplate should be run inside Skin on the long term so subclasses of Skin can use them.
When we introduce a SkinMustache class ideally it would subclass Skin rather than SkinTemplate but if we want to keep things simple we can start with the latter.

  • SkinAddFooterLinks is promoted from SkinTemplate.php to Skin.php (it already uses the skin) and currently only lives in that class for compatibility reasons.
  • The SkinTemplateNavigation::Universal hook is modified to run with a Skin instance instead of a SkinTemplate.
  • The PersonalUrls hook is modified to run with a Skin instance instead of a SkinTemplate.

Related Objects

StatusSubtypeAssignedTask
ResolvedJdlrobson
ResolvedNone
ResolvedJdlrobson
ResolvedSpikeJdlrobson
ResolvedAmmarpad
ResolvedJdlrobson
ResolvedAddshore
ResolvedJdlrobson
ResolvedAmmarpad
ResolvedPwirth
ResolvedAmmarpad
Resolvedvas
Resolved Mabualruz
ResolvedLadsgroup

Event Timeline

Jdlrobson renamed this task from Deprecate the SkinTemplate hooks to [EPIC] Deprecate the SkinTemplate hooks.May 27 2020, 9:32 PM
Jdlrobson renamed this task from [EPIC] Deprecate the SkinTemplate hooks to [EPIC] Deprecate the SkinTemplate hooks and simplify the skin<->extension contract..May 27 2020, 9:46 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Krinkle.
Jdlrobson triaged this task as Medium priority.Jun 5 2020, 9:56 PM
Jdlrobson claimed this task.

Descoped T255319. No sense in having an epic for just one task.
Per Sign off step I have made T263213 for later in the sequence.