Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/91999


Change subject: Hygiene: Merge mobile.head and mobile.startup modules
......................................................................

Hygiene: Merge mobile.head and mobile.startup modules

Confusing having 2

Change-Id: Iaae7825df70541c35958c8fdabe278554d8807b5
---
M includes/Resources.php
1 file changed, 37 insertions(+), 26 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index 52ed56e..11fbeb4 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -114,8 +114,6 @@
                        'less/modules/toggle.less',
                        // FIXME: move to module mobile.stable.styles for some 
reason it breaks RTL when in that module
                        'less/common/navigation.less',
-                       'less/common/overlays.less',
-                       'less/common/drawer.less',
                        'less/common/hacks.less',
                        'less/common/pageactions.less',
                ),
@@ -130,31 +128,23 @@
        ),
 
        // Important: This module is loaded on both mobile and desktop skin
-       'mobile.head' => $wgMFMobileResourceBoilerplate + array(
+       'mobile.startup' => $wgMFMobileResourceBoilerplate + array(
+               'dependencies' => array(
+                       'mobile.templates',
+               ),
                'scripts' => array(
                        'javascripts/common/polyfills.js',
                        'javascripts/common/modules.js',
                        'javascripts/common/Class.js',
                        'javascripts/common/eventemitter.js',
                        'javascripts/common/navigation.js',
-               ),
-               'position' => 'top',
-       ),
-
-       'mobile.startup' => $wgMFMobileResourceBoilerplate + array(
-               'dependencies' => array(
-                       'mobile.head',
-                       'mobile.templates',
-               ),
-               'scripts' => array(
                        'javascripts/common/Router.js',
                        'javascripts/common/api.js',
                        'javascripts/common/PageApi.js',
                        'javascripts/common/application.js',
-                       'javascripts/common/settings.js',
-                       'javascripts/modules/mf-stop-mobile-redirect.js',
+                       'javascripts/common/View.js',
                ),
-               'position' => 'bottom',
+               'position' => 'top',
        ),
 
        'mobile.editor' => $wgMFMobileResourceBoilerplate + array(
@@ -311,6 +301,7 @@
                'dependencies' => array(
                        'mobile.startup',
                        'mobile.loggingSchemas',
+                       'mobile.overlays',
                ),
                'messages' => array(
                        'mobile-frontend-geonotahack',
@@ -453,6 +444,27 @@
                'position' => 'top',
        ),
 
+       'mobile.overlays' => $wgMFMobileResourceBoilerplate + array(
+               'dependencies' => array(
+                       'mobile.templates',
+                       'mobile.startup',
+               ),
+               'scripts' => array(
+                       'javascripts/common/Overlay.js',
+                       'javascripts/common/LoadingOverlay.js',
+               ),
+               'messages' => array(
+                       'mobile-frontend-overlay-escape',
+               ),
+               'templates' => array(
+                       'LoadingOverlay',
+                       'overlay',
+               ),
+               'styles' => array(
+                       'less/common/overlays.less',
+               )
+       ),
+
        // Important: This module is loaded on both mobile and desktop skin
        'mobile.stable.common' => $wgMFMobileResourceBoilerplate + array(
                'dependencies' => array(
@@ -461,14 +473,13 @@
                        'mediawiki.jqueryMsg',
                        'mediawiki.util',
                        'mobile.templates',
+                       'mobile.overlays',
                ),
                'templates' => array(
-                       'LoadingOverlay',
                        'section',
                        'wikitext/commons-upload',
                        // LanguageOverlay.js
                        'overlays/languages',
-                       'overlay',
                        'overlays/cleanup',
                        // search-2.js
                        'articleList',
@@ -488,12 +499,12 @@
                        'ReferencesDrawer',
                        'modules/tutorials/PageActionOverlay',
                ),
+               'styles' => array(
+                       'less/common/drawer.less',
+               ),
                'scripts' => array(
-                       'javascripts/common/View.js',
                        'javascripts/common/Drawer.js',
                        'javascripts/common/CtaDrawer.js',
-                       'javascripts/common/Overlay.js',
-                       'javascripts/common/LoadingOverlay.js',
                        'javascripts/widgets/progress-bar.js',
                        'javascripts/common/notification.js',
                        'javascripts/common/Page.js',
@@ -507,7 +518,6 @@
                        'mobile-frontend-watchlist-cta-button-signup',
                        'mobile-frontend-watchlist-cta-button-login',
                        'mobile-frontend-drawer-cancel',
-                       'mobile-frontend-overlay-escape',
 
                        // PhotoUploaderButton.js
                        'mobile-frontend-photo-upload-cta',
@@ -554,6 +564,8 @@
                        'mediawiki.language',
                ),
                'scripts' => array(
+                       'javascripts/common/settings.js',
+                       'javascripts/modules/mf-stop-mobile-redirect.js',
                        'javascripts/modules/editor/editor.js',
                        'javascripts/modules/mf-toggle.js',
                        'javascripts/modules/issues/issues.js',
@@ -670,9 +682,8 @@
                        'overlays/nearby',
                ),
                'dependencies' => array(
-                       'mobile.stable.common',
+                       'mobile.overlays',
                        'mobile.nearby',
-                       'mobile.beta.common',
                ),
                'scripts' => array(
                        'javascripts/modules/nearby/PagePreviewOverlay.js',
@@ -851,9 +862,9 @@
        ),
 
        'mobile.mobilediff.scripts.beta.head' => $wgMFMobileResourceBoilerplate 
+ array(
-               // should be no dependencies except mobile.head and position to 
top to avoid flash of unstyled content
+               // should be no dependencies except mobile.startup and position 
to top to avoid flash of unstyled content
                'dependencies' => array(
-                       'mobile.head',
+                       'mobile.startup',
                ),
                'position' => 'top',
                'scripts' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaae7825df70541c35958c8fdabe278554d8807b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to