jenkins-bot has submitted this change and it was merged.
Change subject: Promote last-modified-bar beta work to stable
......................................................................
Promote last-modified-bar beta work to stable
- Last modified bar is now on the bottom of the page
- Remove modified bar location specific classes from template
Bug: T104697
Change-Id: I2e2259f381e42944106b9b2972fd83b37acd1ead
---
M includes/Resources.php
M includes/skins/MinervaTemplate.php
M includes/skins/MinervaTemplateBeta.php
M includes/skins/history.mustache
M resources/skins.minerva.base.styles/common.less
M resources/skins.minerva.base.styles/footer.less
M resources/skins.minerva.base.styles/ui.less
D resources/skins.minerva.beta.styles/common.less
D resources/skins.minerva.beta.styles/footer.less
M resources/skins.minerva.content.styles/links.less
M resources/skins.minerva.tablet.beta.styles/ui.less
M resources/skins.minerva.tablet.styles/common.less
12 files changed, 68 insertions(+), 113 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Resources.php b/includes/Resources.php
index f9ab103..5c59211 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -194,9 +194,7 @@
'skins.minerva.beta.styles' => $wgMFResourceFileModuleBoilerplate +
array(
'position' => 'top',
'styles' => array(
- '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',
),
),
diff --git a/includes/skins/MinervaTemplate.php
b/includes/skins/MinervaTemplate.php
index 746c93a..b071b80 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -7,10 +7,6 @@
* Extended Template class of BaseTemplate for mobile devices
*/
class MinervaTemplate extends BaseTemplate {
- /** @var boolean Temporary variable that decides whether
- * history link should be rendered before the content. */
- protected $renderHistoryLinkBeforeContent = true;
-
/** @var boolean Specify whether the page is a special page */
protected $isSpecialPage;
@@ -166,32 +162,6 @@
}
/**
- * Gets history link at top of page if it isn't the main page
- * @param array $data Data used to build the page
- * @return string
- */
- protected function getHistoryLinkTopHtml( $data ) {
- if ( !$this->isMainPage ) {
- return $this->getHistoryLinkHtml( $data );
- } else {
- return '';
- }
- }
-
- /**
- * Gets history link at bottom of page if it is the main page
- * @param array $data Data used to build the page
- * @return string
- */
- protected function getHistoryLinkBottomHtml( $data ) {
- if ( $this->isMainPage ) {
- return $this->getHistoryLinkHtml( $data );
- } else {
- return '';
- }
- }
-
- /**
* Get page secondary actions
*/
protected function getSecondaryActions() {
@@ -252,15 +222,13 @@
'lang' => $data['pageLang'],
'dir' => $data['pageDir'],
) );
- ?>
- <?php
- echo $data[ 'bodytext' ];
- if ( isset( $data['subject-page'] ) ) {
- echo $data['subject-page'];
- }
- echo $this->getPostContentHtml( $data );
- echo $this->getSecondaryActionsHtml();
- echo $this->getHistoryLinkBottomHtml( $data );
+ echo $data[ 'bodytext' ];
+ if ( isset( $data['subject-page'] ) ) {
+ echo $data['subject-page'];
+ }
+ echo $this->getPostContentHtml( $data );
+ echo $this->getSecondaryActionsHtml();
+ echo $this->getHistoryLinkHtml( $data );
?>
</div>
<?php
@@ -314,17 +282,10 @@
* @param array $data Data used to build the page
*/
protected function renderContentWrapper( $data ) {
- if ( $this->renderHistoryLinkBeforeContent ) {
- echo $this->getHistoryLinkTopHtml( $data );
- echo $this->makeInlineMobileHeadEmitScript(
'history-link-loaded' );
- }
echo $this->makeInlineMobileHeadEmitScript( 'header-loaded' );
$this->renderPreContent( $data );
$this->renderContent( $data );
- if ( !$this->renderHistoryLinkBeforeContent ) {
- echo $this->getHistoryLinkTopHtml( $data );
- echo $this->makeInlineMobileHeadEmitScript(
'history-link-loaded' );
- }
+ echo $this->makeInlineMobileHeadEmitScript(
'history-link-loaded' );
}
/**
diff --git a/includes/skins/MinervaTemplateBeta.php
b/includes/skins/MinervaTemplateBeta.php
index eda8ca0..9380a92 100644
--- a/includes/skins/MinervaTemplateBeta.php
+++ b/includes/skins/MinervaTemplateBeta.php
@@ -8,9 +8,6 @@
* beta mode via Special:MobileOptions
*/
class MinervaTemplateBeta extends MinervaTemplate {
- /** {@inheritdoc} */
- protected $renderHistoryLinkBeforeContent = false;
-
/**
* Render available page actions
* @param array $data Data used to build page actions
diff --git a/includes/skins/history.mustache b/includes/skins/history.mustache
index 47cc874..244fe98 100644
--- a/includes/skins/history.mustache
+++ b/includes/skins/history.mustache
@@ -1,6 +1,5 @@
-{{! FIXME: Remove .pre-content when the last modified bar in beta is promoted
to stable }}
-{{^isMainPage}}<div class="last-modified-bar view-border-box pre-content
post-content">{{/isMainPage}}
- <div id="mw-mf-last-modified" class="truncated-text">
+{{^isMainPage}}<div class="last-modified-bar view-border-box">{{/isMainPage}}
+ <div id="mw-mf-last-modified" class="truncated-text
last-modified-bottom">
<a href="{{link}}"
data-user-name="{{username}}"
data-user-gender="{{userGender}}"
diff --git a/resources/skins.minerva.base.styles/common.less
b/resources/skins.minerva.base.styles/common.less
index 0619c9c..82f593b 100644
--- a/resources/skins.minerva.base.styles/common.less
+++ b/resources/skins.minerva.base.styles/common.less
@@ -89,4 +89,4 @@
// currently used to hide talk button
.hidden {
display: none !important;
-}
+}
\ No newline at end of file
diff --git a/resources/skins.minerva.base.styles/footer.less
b/resources/skins.minerva.base.styles/footer.less
index 39f523d..de35002 100644
--- a/resources/skins.minerva.base.styles/footer.less
+++ b/resources/skins.minerva.base.styles/footer.less
@@ -8,8 +8,7 @@
#footer {
padding: 2em @contentMargin 1.5em @contentMargin;
- margin: 2em auto 0 auto;
- border-top: 1px solid @colorGray10;
+ margin: 0 auto;
font-size: 0.9em;
clear: both;
@@ -54,3 +53,13 @@
}
}
}
+
+.mw-mf-special,
+.page-Main_Page {
+ #footer {
+ // same as in #footer (footer.less)
+ margin-top: 2em;
+ // same as in #footer (footer.less)
+ border-top: 1px solid @colorGray10;
+ }
+}
diff --git a/resources/skins.minerva.base.styles/ui.less
b/resources/skins.minerva.base.styles/ui.less
index ee8c7c0..afd1e7c 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -21,11 +21,16 @@
border-top: none;
}
+// FIXME: remove when cache clears
+.stable .last-modified-bar.pre-content {
+ padding: 0 !important;
+ margin: 0 !important;
+}
+
// FIXME: REMOVE .stable .pre-content.last-modified-bar selector when cache
clears
.stable .pre-content.last-modified-bar,
.last-modified-bar {
- background-color: @colorGray14;
- padding: 5px @contentMargin;
+ background-color: transparent;
display: block;
color: @colorGray6;
transition: background-color 0.2s ease, color 0.2s ease;
@@ -39,8 +44,17 @@
}
}
+ #mw-mf-last-modified {
+ padding: 5px @contentMargin;
+ background-color: @colorGray14;
+ }
+
&.active {
- background-color: @lastModifiedBarActiveBackgroundColor;
+
+ #mw-mf-last-modified {
+ background-color: @lastModifiedBarActiveBackgroundColor;
+ }
+
color: #fff;
a {
color: #fff;
diff --git a/resources/skins.minerva.beta.styles/common.less
b/resources/skins.minerva.beta.styles/common.less
deleted file mode 100644
index fb7fe76..0000000
--- a/resources/skins.minerva.beta.styles/common.less
+++ /dev/null
@@ -1,7 +0,0 @@
-.alpha,
-.beta {
- .last-modified-bar {
- // because the last modified bar is at the bottom of the page
- margin-top: 1.5em;
- }
-}
diff --git a/resources/skins.minerva.beta.styles/footer.less
b/resources/skins.minerva.beta.styles/footer.less
deleted file mode 100644
index f3ede6c..0000000
--- a/resources/skins.minerva.beta.styles/footer.less
+++ /dev/null
@@ -1,19 +0,0 @@
-@import "minerva.variables";
-
-.alpha,
-.beta {
- #footer {
- margin-top: 0;
- border-top: none;
- }
-
- &.mw-mf-special,
- &.page-Main_Page {
- #footer {
- // same as in #footer (footer.less)
- margin-top: 2em;
- // same as in #footer (footer.less)
- border-top: 1px solid @colorGray10;
- }
- }
-}
\ No newline at end of file
diff --git a/resources/skins.minerva.content.styles/links.less
b/resources/skins.minerva.content.styles/links.less
index c6d2a28..5ee3caa 100644
--- a/resources/skins.minerva.content.styles/links.less
+++ b/resources/skins.minerva.content.styles/links.less
@@ -33,12 +33,13 @@
}
}
-.content {
- // Generic class name needed
- .return-link,
- #mw-mf-last-modified {
- display: block;
- font-size: .9em;
+// Generic class name needed
+.return-link,
+#mw-mf-last-modified {
+ display: block;
+ font-size: .9em;
+ // FIXME: instances of .last-modified-bottom can be completely removed
after cache expires.
+ &.last-modified-bottom {
margin-top: 1.5em;
}
}
diff --git a/resources/skins.minerva.tablet.beta.styles/ui.less
b/resources/skins.minerva.tablet.beta.styles/ui.less
index c2f3b82..8a9378c 100644
--- a/resources/skins.minerva.tablet.beta.styles/ui.less
+++ b/resources/skins.minerva.tablet.beta.styles/ui.less
@@ -2,24 +2,4 @@
@import "mediawiki.ui/variables";
@media all and (min-width: @wgMFDeviceWidthTablet) {
- .last-modified-bar.post-content {
- background-color: transparent;
- padding-left: 0;
- padding-right: 0;
- font-size: 1em;
- &.active {
- background-color: transparent;
- #mw-mf-last-modified {
- background-color:
@lastModifiedBarActiveBackgroundColor;
- }
- }
-
- // This rule must be scoped to .last-modified-bar to prevent
side effects on the MainPage bar
- #mw-mf-last-modified {
- background-color: @colorGray14;
- font-size: 0.9em;
- padding-left: 16px;
- padding-right: 16px;
- }
- }
}
diff --git a/resources/skins.minerva.tablet.styles/common.less
b/resources/skins.minerva.tablet.styles/common.less
index d42b66c..1e403d2 100644
--- a/resources/skins.minerva.tablet.styles/common.less
+++ b/resources/skins.minerva.tablet.styles/common.less
@@ -115,6 +115,7 @@
padding-top: 0;
padding-bottom: 0;
}
+ // FIXME: remove when cache clears
.last-modified-bar.pre-content {
max-width: none;
padding: 0 16px;
@@ -128,4 +129,25 @@
#mw-mf-last-modified {
padding: 5px 0;
}
+
+ .last-modified-bar {
+ background-color: transparent;
+ padding-left: 0;
+ padding-right: 0;
+ font-size: 1em;
+ &.active {
+ background-color: transparent;
+ #mw-mf-last-modified {
+ background-color:
@lastModifiedBarActiveBackgroundColor;
+ }
+ }
+
+ // This rule must be scoped to .last-modified-bar to prevent
side effects on the MainPage bar
+ #mw-mf-last-modified {
+ background-color: @colorGray14;
+ font-size: 0.9em;
+ padding-left: 16px;
+ padding-right: 16px;
+ }
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/235904
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e2259f381e42944106b9b2972fd83b37acd1ead
Gerrit-PatchSet: 17
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: Robmoen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits