Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/372558 )

Change subject: Hygiene: Remove and tidy some Minerva references
......................................................................

Hygiene: Remove and tidy some Minerva references

* Update inline comments refering Minerva
* Correct a test name
* Drop an unnecessary config variable
* Correct folder where Grunt looks
* No need to register MinervaHooks registration function

Change-Id: I15cab5e51aee6796259f2a61ba0204bec2a64d23
---
M Gruntfile.js
M includes/MobileFrontend.hooks.php
M includes/modules/MobileSiteModule.php
M includes/specials/MobileSpecialPage.php
M resources/mobile.special.uploads.styles/default.less
M tests/browser/LocalSettings.php
M tests/phpunit/MobileFrontend.skin.hooksTest.php
7 files changed, 10 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/58/372558/1

diff --git a/Gruntfile.js b/Gruntfile.js
index ba64921..f20c340 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -24,7 +24,7 @@
                                syntax: 'less'
                        },
                        all: [
-                               'minerva.less/**/*.less',
+                               'mobile.less/**/*.less',
                                'resources/**/*.less'
                        ]
                },
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 594fac5..787a00d 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -830,9 +830,8 @@
                $preferences[SpecialMobileWatchlist::FILTER_OPTION_NAME] = 
$definition;
                $preferences[SpecialMobileWatchlist::VIEW_OPTION_NAME] = 
$definition;
 
-               // Remove the Minerva skin from the preferences unless Minerva 
has been enabled in
-               // BetaFeatures provided that the user has not set it as the 
default skin.
-               // FIXME: This can be removed when Minerva lives in its own 
repository.
+               // Remove the Minerva skin from the preferences page
+               // FIXME: This can be removed when T171644 has been resolved.
                if ( $defaultSkin !== 'minerva' ) {
                        // Preference key/values are backwards. The value is 
the name of the skin. The
                        // key is the text+links to display.
@@ -1290,10 +1289,6 @@
                } else {
                        Hooks::register( 'UserLoginForm', 
'MobileFrontendHooks::onUserLoginForm' );
                        Hooks::register( 'UserCreateForm', 
'MobileFrontendHooks::onUserCreateForm' );
-               }
-
-               if ( class_exists( 'MinervaHooks' ) ) {
-                       MinervaHooks::onRegistration();
                }
        }
 }
diff --git a/includes/modules/MobileSiteModule.php 
b/includes/modules/MobileSiteModule.php
index 64880ee..9c39d30 100644
--- a/includes/modules/MobileSiteModule.php
+++ b/includes/modules/MobileSiteModule.php
@@ -5,8 +5,8 @@
 
 /**
  * Alternate of ResourceLoaderSiteModule for mobile web.
- * Mobile.[css|js] is a temporary drop-in replacement for Common.css/js, which
- * predates Minerva and is not compatible.
+ * Mobile.[css|js] is a temporary drop-in replacement for Common.css/js which 
contains JS that
+ * is usually incompatible
  */
 class MobileSiteModule extends ResourceLoaderWikiModule {
        // Should not be enabled on desktop which has ResourceLoaderSiteModule 
instead
diff --git a/includes/specials/MobileSpecialPage.php 
b/includes/specials/MobileSpecialPage.php
index 641ba95..31b6a7c 100644
--- a/includes/specials/MobileSpecialPage.php
+++ b/includes/specials/MobileSpecialPage.php
@@ -99,7 +99,10 @@
                $specialScriptModuleName = 'mobile.special.' . $id . '.scripts';
 
                if ( $rl->isModuleRegistered( $specialStyleModuleName ) ) {
-                       $out->addModuleStyles( $specialStyleModuleName );
+                       $out->addModuleStyles( [
+                               'mobile.special.styles',
+                               $specialStyleModuleName
+                       ] );
                }
 
                if ( $rl->isModuleRegistered( $specialScriptModuleName ) ) {
diff --git a/resources/mobile.special.uploads.styles/default.less 
b/resources/mobile.special.uploads.styles/default.less
index 32ebf50..072dbe8 100644
--- a/resources/mobile.special.uploads.styles/default.less
+++ b/resources/mobile.special.uploads.styles/default.less
@@ -1,4 +1,3 @@
-// These skins adjust the Special:Uploads page for non-Minerva skins
 .image-list {
        li {
                text-align: left;
diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
index 6826133..30de340 100644
--- a/tests/browser/LocalSettings.php
+++ b/tests/browser/LocalSettings.php
@@ -21,9 +21,6 @@
 
 $wgMFEnableBeta = true;
 
-// needed for testing whether the language button is displayed and disabled
-$wgMinervaAlwaysShowLanguageButton = true;
-
 // For those who have wikibase installed.
 $wgMFUseWikibase = true;
 
diff --git a/tests/phpunit/MobileFrontend.skin.hooksTest.php 
b/tests/phpunit/MobileFrontend.skin.hooksTest.php
index 3f9497b..1bf3675 100644
--- a/tests/phpunit/MobileFrontend.skin.hooksTest.php
+++ b/tests/phpunit/MobileFrontend.skin.hooksTest.php
@@ -3,7 +3,7 @@
 /**
  * @group MobileFrontend
  */
-class SkinMinervaTest extends MediaWikiTestCase {
+class MobileFrontendSkinHooksTest extends MediaWikiTestCase {
        /**
         * @dataProvider getGetPluralLicenseInfo
         * @covers MobileFrontendSkinHooks::getPluralLicenseInfo

-- 
To view, visit https://gerrit.wikimedia.org/r/372558
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15cab5e51aee6796259f2a61ba0204bec2a64d23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to