From: Bartosz Dziewoński Date: Tue, 29 Apr 2014 08:37:46 +0000 (+0200) Subject: Rename basic skinning modules: skins.common.* → mediawiki.skinning.* X-Git-Tag: 1.31.0-rc.0~15912^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=fc69e6c645c6686de62e3d249a5db36592eab776;p=lhc%2Fweb%2Fwiklou.git Rename basic skinning modules: skins.common.* → mediawiki.skinning.* For consistency in module naming: skins.* contains the modules for particular skins, mediawiki.* contains the modules for core MediaWiki itself. Clearly this belongs more to the latter than the former. 'skinning' is probably the best thing to name these to not sound silly and avoid confusion with actual skins. (The fact that there are files in skins/ that are not skin-related is a remnant of bad decisions in the past. I want to clean that up as well this year.) Updated release notes and usages, kept old definitions for HTML backwards-compatibility (for 30 days on WMF deployment). I intend to backport this to 1.23 (sans the compatibility modules). Otherwise the current module names become "public API" and we either break compatibility later or support them forever. Change-Id: I3947eaacd389eaba32f6fc8370395caec4aa1edb --- diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 231903ce6b..3dfceb129d 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -289,14 +289,14 @@ changes to languages because of Bugzilla reports. * (bug 52812) Removed "Disable search suggestions" from Preference. * (bug 52809) Removed "Disable browser page caching" from Preference. * Three new modules intended for use by custom skins were added: - 'skins.common.elements', 'skins.common.content', and 'skins.common.interface', - representing three levels of standard MediaWiki styling. Previously skin - creators wishing to use them had to refer to the file names of appropriate - files directly, which is now discouraged. + 'mediawiki.skinning.elements', 'mediawiki.skinning.content', and + 'mediawiki.skinning.interface', representing three levels of standard + MediaWiki styling. Previously skin creators wishing to use them had to refer + to the file names of appropriate files directly, which is now discouraged. * The modules 'skins.vector' and 'skins.monobook' have been renamed to 'skins.vector.styles' and 'skins.monobook.styles', respectively, and their definition was changed not to include the common*.css files; - the two skins now load the 'skins.common.interface' module instead. + the two skins now load the 'mediawiki.skinning.interface' module instead. * A page_links_updated field has been added to the page table. * SpecialPage::getTitle has been deprecated in favor of SpecialPage::getPageTitle. diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index cbfa34f241..c3fd51de76 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -134,7 +134,7 @@ class WebInstallerOutput { // and loaded as one file. $moduleNames = array( 'mediawiki.legacy.shared', - 'skins.common.interface', + 'mediawiki.skinning.interface', 'skins.vector.styles', 'mediawiki.legacy.config', ); diff --git a/resources/Resources.php b/resources/Resources.php index f979e21153..ceca3b883e 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -50,6 +50,8 @@ return array( // Scripts for the dynamic language specific data, like grammar forms. 'mediawiki.language.data' => array( 'class' => 'ResourceLoaderLanguageDataModule' ), + /* MediaWiki base skinning modules */ + /** * Common skin styles, grouped into three graded levels. * @@ -74,12 +76,38 @@ return array( * common to MonoBook clones. And since practically every skin that currently exists within * core is a MonoBook clone, all our core skins currently use this level. * - * These modules are typically loaded by addModuleStyles which has absolutely no concept of - * dependency management. As a result, the skins.common.* modules contain duplicate stylesheet - * references instead of setting 'dependencies' to the lower level the module is based on. For - * this reason avoid including multiple skins.common.* modules into your skin as this will - * result in duplicate css. + * These modules are typically loaded by addModuleStyles(), which has absolutely no concept of + * dependency management. As a result they contain duplicate stylesheet references instead of + * setting 'dependencies' to the lower level the module is based on. For this reason avoid + * including more than one of them into your skin as this will result in duplicate CSS. */ + 'mediawiki.skinning.elements' => array( + 'styles' => array( + 'common/commonElements.css' => array( 'media' => 'screen' ), + ), + 'remoteBasePath' => $GLOBALS['wgStylePath'], + 'localBasePath' => $GLOBALS['wgStyleDirectory'], + ), + 'mediawiki.skinning.content' => array( + 'styles' => array( + 'common/commonElements.css' => array( 'media' => 'screen' ), + 'common/commonContent.css' => array( 'media' => 'screen' ), + ), + 'remoteBasePath' => $GLOBALS['wgStylePath'], + 'localBasePath' => $GLOBALS['wgStyleDirectory'], + ), + 'mediawiki.skinning.interface' => array( + // Used in the web installer. Test it after modifying this definition! + 'styles' => array( + 'common/commonElements.css' => array( 'media' => 'screen' ), + 'common/commonContent.css' => array( 'media' => 'screen' ), + 'common/commonInterface.css' => array( 'media' => 'screen' ), + ), + 'remoteBasePath' => $GLOBALS['wgStylePath'], + 'localBasePath' => $GLOBALS['wgStyleDirectory'], + ), + + // Temporarily kept for backwards-compatibility with generated HTML 'skins.common.elements' => array( 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), @@ -96,7 +124,6 @@ return array( 'localBasePath' => $GLOBALS['wgStyleDirectory'], ), 'skins.common.interface' => array( - // Used in the web installer. Test it after modifying this definition! 'styles' => array( 'common/commonElements.css' => array( 'media' => 'screen' ), 'common/commonContent.css' => array( 'media' => 'screen' ), @@ -106,6 +133,7 @@ return array( 'localBasePath' => $GLOBALS['wgStyleDirectory'], ), + /** * Skins * Be careful not to add 'scripts' to these modules, diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 5c44938073..72056b953c 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -47,7 +47,7 @@ class SkinMonoBook extends SkinTemplate { function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles( array( 'skins.common.interface', 'skins.monobook.styles' ) ); + $out->addModuleStyles( array( 'mediawiki.skinning.interface', 'skins.monobook.styles' ) ); // TODO: Migrate all of these $out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' ); diff --git a/skins/Vector.php b/skins/Vector.php index ee612727fc..7a714ad623 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -68,7 +68,7 @@ class SkinVector extends SkinTemplate { function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $styles = array( 'skins.common.interface', 'skins.vector.styles' ); + $styles = array( 'mediawiki.skinning.interface', 'skins.vector.styles' ); wfRunHooks( 'SkinVectorStyleModules', array( $this, &$styles ) ); $out->addModuleStyles( $styles ); }