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

Change subject: Alpha, Beta: Center align the contents of Special:History
......................................................................


Alpha, Beta: Center align the contents of Special:History

Bug: T101149
Change-Id: Ied3c75fbb0bc47cce868fe9f620ea24ff4eb826e
---
M includes/Resources.php
M includes/specials/SpecialMobileHistory.php
A resources/mobile.special.history.beta.styles/default.less
3 files changed, 33 insertions(+), 0 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Resources.php b/includes/Resources.php
index d04dd24..f617fd9 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -1593,6 +1593,12 @@
                ),
        ),
 
+       'mobile.special.history.beta.styles' => 
$wgMFMobileSpecialPageResourceBoilerplate + array(
+               'styles' => array(
+                       
'resources/mobile.special.history.beta.styles/default.less',
+               ),
+               'position' => 'top',
+       ),
        // These are NOT empty see $wgResourceModuleSkinStyles.
        'mobile.special.history.styles' => 
$wgMFMobileSpecialPageResourceBoilerplate + array(
                'position' => 'top',
diff --git a/includes/specials/SpecialMobileHistory.php 
b/includes/specials/SpecialMobileHistory.php
index e7d5f35..911c205 100644
--- a/includes/specials/SpecialMobileHistory.php
+++ b/includes/specials/SpecialMobileHistory.php
@@ -96,15 +96,25 @@
                $out = $this->getOutput();
                $out->setPageTitle( $this->msg( 'history' ) );
                $out->addModuleStyles( 'mobile.pagelist.styles' );
+               // add beta styles
+               if ( MobileContext::singleton()->isBetaGroupMember() ) {
+                       $out->addModuleStyles( 
'mobile.special.history.beta.styles' );
+               }
                $this->offset = $this->getRequest()->getVal( 'offset', false );
                if ( $par ) {
                        // enter article history view
                        $this->title = Title::newFromText( $par );
                        if ( $this->title && $this->title->exists() ) {
                                $this->addModules();
+                               $this->getOutput()->addHtml(
+                                       Html::openElement( 'div', array( 
'class' => 'history' ) )
+                               );
                                $this->renderHeaderBar( $this->title );
                                $res = $this->doQuery();
                                $this->showHistory( $res );
+                               $this->getOutput()->addHtml(
+                                       Html::closeElement( 'div' )
+                               );
                                return;
                        }
                }
diff --git a/resources/mobile.special.history.beta.styles/default.less 
b/resources/mobile.special.history.beta.styles/default.less
new file mode 100644
index 0000000..a4f9d88
--- /dev/null
+++ b/resources/mobile.special.history.beta.styles/default.less
@@ -0,0 +1,17 @@
+@import "minerva.variables";
+@import "minerva.mixins";
+
+@media all and (min-width: @wgMFDeviceWidthTablet) {
+       // We need to be this specific in order to override other rules.
+       .alpha.mw-mf-special,
+       .beta.mw-mf-special {
+               #content_wrapper {
+                       > .pre-content,
+                       > .history {
+                               max-width: @contentMaxWidthTablet;
+                               margin: 0 auto;
+                               padding: 0 @contentPaddingTablet;
+                       }
+               }
+       }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied3c75fbb0bc47cce868fe9f620ea24ff4eb826e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to