When we introduce a SkinMustache class ideally it would subclass Skin rather than SkinTemplate but to make its introduction easier we made it extend SkinTemplate. After seeing how this class has grown, the class inheritance is correct but SkinTemplate carries a lot of QuickTemplate specific code that should be factored out.
# Acceptance criteria
[x] Skin::getFooterLinks is promoted from SkinTemplate.php to Skin.php. The hook SkinAddFooterLinks is not impacted by this move as it already uses the skin and currently only lives in that class for compatibility reasons.
[] A new class SkinBaseTemplate has been added, and use of SkinTemplate is soft deprecated (too many skins use it to hard deprecate)
PersonalUrls
SkinTemplateNavigation
SkinTemplateNavigation__SpecialPage
SkinTemplateNavigation__Universal
[] A QuickTemplate::setAll method is added to allow passing of data in the form of an array, to the set methods in QuickTemplate
- [] All BaseTemplate specific calls e.g.x] SkinMustache methods are promoted to SkinTemplate: getFooterTemplateData, getLogoData, buildSearchProps, getPortletsTemplateData, getPortletData, `$tpl->set` have been abstractgetPortletLabel
- [x] SkinMustache::tailElement is generalized away to the QuickTemplate classnd moved to OutputPage T257704
-- [] SkinTemplate::getTemplateData and SkinTemplate::getLegacyTemplateData are defined [] The following methods will be pulled out into a SkinMenuDirector which will be in charge of managing the menu data passed to skins. This will be good ground work for improving the menu system in T272624 and will make the Skin more readable. Existing SkinTemplate methods will be modified to use the MenuDirector and promoted to Skin where needed:
-- [] The data inside SkinTemplate::getLegacygetPortletsTemplateData goes through the deprecation processata
-- [] SkinTemplate::getLegacyTemplateData is deprecated and removed.buildContentNavigationUrls
- [x] SkinMustache methods are promoted to SkinTemplate: getFooterTemplateData, getLogoData, buildSearchProps, getPortletsTemplateData, getPortletData, getPortletLabel- [] buildPersonalPageItem
- [x] SkinMustache::tailElement is generalized and moved to OutputPage T257704-- [] buildPersonalUrls
-- [] getReturnToParam
-- [] makeTalkUrlDetails
-- [] buildLogoutLinkData
-- [] buildLoginData
-- [] tabAction
-- [] getWatchLinkAttrs
-- [] runOnSkinTemplateNavigationHooks
-- [] useCombinedLoginLink
-- [] buildCreateAccountData
-- [] injectLegacyMenusIntoPersonalTools
- [] The parts of setupTemplateContext() that relate to Skin should be upstreamed to the Skin method. SkinTemplate should call parent.
- [] The following methods should be promoted from SkinTemplate to Skin:
-- [] getJsConfigVars
-- [] getTemplateData
-- [] buildSearchProps
-- [] getLogoData
-- [] getPortletData
-- [] getPortletLabel
-- [] getFooterTemplateData
-- [] getFooterIcons
-- [] wrapHTML
-- [] prepareUndeleteLink
-- [] prepareUserLanguageAttributes
- [] Callers to the SkinTemplateNavigationUniversal hook should be modified to take the more generic Skin as a parameter (CologneBlue, MonoBook, ULS).
- [] Callers to the SkinMinervaOptionsInit hook should be modified to take the more generic Skin as a parameter.
- [] Skin::outputPage should no longer be abstract. The method in SkinTemplate should be copied to Skin.
- [] Callers of Skin::runOnSkinTemplateNavigationHooks and SkinTemplateNavigation__Universal should be modified to expect a Skin rather than SkinTemplate class (VisualEditor, Vector)
- [] Callers of the PersonalUrls hook must be modified to expect an instance of Skin rather than SkinTemplate e.g. https://gerrit.wikimedia.org/g/mediawiki/extensions/BetaFeatures/+/101ac03487f86d3b72b4953c54e677c7d4877a9d/includes/Hooks.php#355
-- [] SkinTemplate::prepareQuickTemplate should be modified to make use of Skin::getTemplateData where possible.
- [] SkinMustache extends Skin rather than SkinTemplate