jenkins-bot has submitted this change and it was merged.

Change subject: Sandbox alpha and beta styles from stable
......................................................................


Sandbox alpha and beta styles from stable

This moves all styles that get loaded in the head into
separate ResourceLoader modules.

I've left any .alpha, .beta class usage in JavaScript modules
and special pages since they do not matter so much.

Alpha styles are left in beta modules given that we have been talking
about removing alpha and performance is less of a concern in this mode

Other changes:
* Remove FIXME relating to spinner which seems to be from the mw-ui-icon days
and is no longer needed.

Bug: T98400
Change-Id: I08eb91094f36e07b36e2351054c89f608d384c17
---
M includes/Resources.php
M resources/skins.minerva.alpha.styles/ui.alpha.less
M resources/skins.minerva.base.styles/common.less
M resources/skins.minerva.base.styles/ui.less
A resources/skins.minerva.beta.styles/common.less
R resources/skins.minerva.beta.styles/footer.less
A resources/skins.minerva.beta.styles/hacks.less
R resources/skins.minerva.beta.styles/main.less
R resources/skins.minerva.beta.styles/pageactions.less
M resources/skins.minerva.content.styles/hacks.less
R resources/skins.minerva.tablet.beta.styles/common.less
R resources/skins.minerva.tablet.beta.styles/hacks.less
M resources/skins.minerva.tablet.styles/common.less
13 files changed, 72 insertions(+), 80 deletions(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  Bmansurov: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/Resources.php b/includes/Resources.php
index d04dd24..a7007bc 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -92,8 +92,8 @@
        'skins.minerva.tablet.beta.styles' => 
$wgMFResourceFileModuleBoilerplate + array(
                'position' => 'top',
                'styles' => array(
-                       
'resources/skins.minerva.tablet.styles/common.beta.less',
-                       'resources/skins.minerva.tablet.styles/hacks.beta.less',
+                       
'resources/skins.minerva.tablet.beta.styles/common.less',
+                       'resources/skins.minerva.tablet.beta.styles/hacks.less',
                ),
        ),
        'skins.minerva.tablet.alpha.styles' => 
$wgMFResourceFileModuleBoilerplate + array(
@@ -192,9 +192,11 @@
        'skins.minerva.beta.styles' => $wgMFResourceFileModuleBoilerplate + 
array(
                'position' => 'top',
                'styles' => array(
-                       
'resources/skins.minerva.beta.styles/pageactions.beta.less',
-                       'resources/skins.minerva.beta.styles/footer.beta.less',
-                       'resources/skins.minerva.beta.styles/main.beta.less',
+                       'resources/skins.minerva.beta.styles/common.less',
+                       'resources/skins.minerva.beta.styles/pageactions.less',
+                       'resources/skins.minerva.beta.styles/footer.less',
+                       'resources/skins.minerva.beta.styles/main.less',
+                       'resources/skins.minerva.beta.styles/hacks.less',
                ),
        ),
        'skins.minerva.beta.images' => $wgMFResourceFileModuleBoilerplate + 
array(
diff --git a/resources/skins.minerva.alpha.styles/ui.alpha.less 
b/resources/skins.minerva.alpha.styles/ui.alpha.less
index 1a179a9..dd9eed3 100644
--- a/resources/skins.minerva.alpha.styles/ui.alpha.less
+++ b/resources/skins.minerva.alpha.styles/ui.alpha.less
@@ -1,3 +1,4 @@
+
 @import "minerva.variables";
 @import "minerva.mixins";
 @import "mediawiki.mixins";
@@ -30,3 +31,25 @@
        }
 }
 
+.alpha {
+
+       .header {
+               background-color: #fff;
+               position: relative;
+
+               > .header-title {
+                       // align the text in the middle regardless of whether 
the notification icon exists or not
+                       bottom: 0;
+                       left: @headerHeight;
+                       position: absolute;
+                       right: @headerHeight;
+                       text-align: center;
+                       top: 0;
+                       a {
+                               display: block;
+                               line-height: @headerHeight;
+                               text-decoration: none;
+                       }
+               }
+       }
+}
diff --git a/resources/skins.minerva.base.styles/common.less 
b/resources/skins.minerva.base.styles/common.less
index 7dd627e..c467eb1 100644
--- a/resources/skins.minerva.base.styles/common.less
+++ b/resources/skins.minerva.base.styles/common.less
@@ -55,12 +55,6 @@
 .last-modified-bar {
        font-size: .9em;
 }
-.alpha,
-.beta {
-       .last-modified-bar {
-               margin-top: 1.5em;
-       }
-}
 
 // For Minerva desktop
 #toc,
diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index cfda712..cf6761b 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -312,46 +312,6 @@
        }
 }
 
-// FIXME: identify why this is here.
-.alpha {
-       .spinner {
-               margin: auto;
-       }
-}
-
-.alpha {
-       .header {
-               background-color: #fff;
-               position: relative;
-
-               > .header-title {
-                       // align the text in the middle regardless of whether 
the notification icon exists or not
-                       bottom: 0;
-                       left: @headerHeight;
-                       position: absolute;
-                       right: @headerHeight;
-                       text-align: center;
-                       top: 0;
-                       a {
-                               display: block;
-                               line-height: @headerHeight;
-                               text-decoration: none;
-                       }
-               }
-       }
-}
-
-.alpha,
-.beta {
-       #page-secondary-actions {
-               &:before {
-                       content: "";
-                       display: block;
-                       clear: both;
-               }
-       }
-}
-
 .client-nojs {
        // alpha uses a magnifying glass as the search button so it doesn't 
need this styling
        .stable,
diff --git a/resources/skins.minerva.beta.styles/common.less 
b/resources/skins.minerva.beta.styles/common.less
new file mode 100644
index 0000000..92f7446
--- /dev/null
+++ b/resources/skins.minerva.beta.styles/common.less
@@ -0,0 +1,6 @@
+.alpha,
+.beta {
+       .last-modified-bar {
+               margin-top: 1.5em;
+       }
+}
diff --git a/resources/skins.minerva.beta.styles/footer.beta.less 
b/resources/skins.minerva.beta.styles/footer.less
similarity index 100%
rename from resources/skins.minerva.beta.styles/footer.beta.less
rename to resources/skins.minerva.beta.styles/footer.less
diff --git a/resources/skins.minerva.beta.styles/hacks.less 
b/resources/skins.minerva.beta.styles/hacks.less
new file mode 100644
index 0000000..154d722
--- /dev/null
+++ b/resources/skins.minerva.beta.styles/hacks.less
@@ -0,0 +1,6 @@
+// Hide the infobox in alpha JS mode
+.client-js .alpha {
+       .infobox {
+               display: none;
+       }
+}
diff --git a/resources/skins.minerva.beta.styles/main.beta.less 
b/resources/skins.minerva.beta.styles/main.less
similarity index 100%
rename from resources/skins.minerva.beta.styles/main.beta.less
rename to resources/skins.minerva.beta.styles/main.less
diff --git a/resources/skins.minerva.beta.styles/pageactions.beta.less 
b/resources/skins.minerva.beta.styles/pageactions.less
similarity index 89%
rename from resources/skins.minerva.beta.styles/pageactions.beta.less
rename to resources/skins.minerva.beta.styles/pageactions.less
index 03772a4..40e9656 100644
--- a/resources/skins.minerva.beta.styles/pageactions.beta.less
+++ b/resources/skins.minerva.beta.styles/pageactions.less
@@ -44,6 +44,17 @@
        }
 }
 
+.alpha,
+.beta {
+       #page-secondary-actions {
+               &:before {
+                       content: "";
+                       display: block;
+                       clear: both;
+               }
+       }
+}
+
 @media all and (max-width: @wgMFDeviceWidthTablet) {
        .alpha,
        .beta {
diff --git a/resources/skins.minerva.content.styles/hacks.less 
b/resources/skins.minerva.content.styles/hacks.less
index 2758582..8b59640 100644
--- a/resources/skins.minerva.content.styles/hacks.less
+++ b/resources/skins.minerva.content.styles/hacks.less
@@ -12,13 +12,6 @@
 @import "minerva.variables";
 @import "minerva.mixins";
 
-// Hide the infobox in alpha JS mode
-.client-js .alpha {
-       .infobox {
-               display: none;
-       }
-}
-
 .content {
        // Hide links such as `Wikisource has original works on the topic 
dinosaur (use wikidata instead)
        .sistersitebox,
diff --git a/resources/skins.minerva.tablet.styles/common.beta.less 
b/resources/skins.minerva.tablet.beta.styles/common.less
similarity index 63%
rename from resources/skins.minerva.tablet.styles/common.beta.less
rename to resources/skins.minerva.tablet.beta.styles/common.less
index 5537749..a2fba42 100644
--- a/resources/skins.minerva.tablet.styles/common.beta.less
+++ b/resources/skins.minerva.tablet.beta.styles/common.less
@@ -27,6 +27,25 @@
                        margin-right: auto;
                        padding: 5px @contentPaddingTablet;
                }
+
+               .pre-content {
+                       padding-left: @contentPaddingTablet;
+                       padding-right: @contentPaddingTablet;
+
+                       #section_0 {
+                               border-bottom: none;
+                               // FIXME: After this and the new page-action 
CSS below are promoted to stable,
+                               // move page-actions before the h1 in the DOM, 
remove the 220px padding on the
+                               // header, and change the absolute positioning 
of page-actions to float.
+                               padding: 0 220px 7px 0;
+                               font-size: 2.6525em; // 42px
+                       }
+               }
+               #page-actions {
+                       right: @contentPaddingTablet;
+                       top: 36px;
+                       padding: 0;
+               }
        }
 
        .beta {
diff --git a/resources/skins.minerva.tablet.styles/hacks.beta.less 
b/resources/skins.minerva.tablet.beta.styles/hacks.less
similarity index 100%
rename from resources/skins.minerva.tablet.styles/hacks.beta.less
rename to resources/skins.minerva.tablet.beta.styles/hacks.less
diff --git a/resources/skins.minerva.tablet.styles/common.less 
b/resources/skins.minerva.tablet.styles/common.less
index 6905718..d10ca60 100644
--- a/resources/skins.minerva.tablet.styles/common.less
+++ b/resources/skins.minerva.tablet.styles/common.less
@@ -103,26 +103,4 @@
        #mw-mf-last-modified {
                padding: 5px @contentPaddingTablet;
        }
-
-       .alpha,
-       .beta {
-               .pre-content {
-                       padding-left: @contentPaddingTablet;
-                       padding-right: @contentPaddingTablet;
-
-                       #section_0 {
-                               border-bottom: none;
-                               // FIXME: After this and the new page-action 
CSS below are promoted to stable,
-                               // move page-actions before the h1 in the DOM, 
remove the 220px padding on the
-                               // header, and change the absolute positioning 
of page-actions to float.
-                               padding: 0 220px 7px 0;
-                               font-size: 2.6525em; // 42px
-                       }
-               }
-               #page-actions {
-                       right: @contentPaddingTablet;
-                       top: 36px;
-                       padding: 0;
-               }
-       }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I08eb91094f36e07b36e2351054c89f608d384c17
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to