Rename basic skinning modules: skins.common.* → mediawiki.skinning.*
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 29 Apr 2014 08:37:46 +0000 (10:37 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 2 May 2014 17:24:09 +0000 (17:24 +0000)
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

RELEASE-NOTES-1.23
includes/installer/WebInstallerOutput.php
resources/Resources.php
skins/MonoBook.php
skins/Vector.php

index 231903c..3dfceb1 100644 (file)
@@ -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.
index cbfa34f..c3fd51d 100644 (file)
@@ -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',
                );
index f979e21..ceca3b8 100644 (file)
@@ -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,
index 5c44938..72056b9 100644 (file)
@@ -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' );
index ee61272..7a714ad 100644 (file)
@@ -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 );
        }