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

Change subject: WIP: Allow feature flagging of new header
......................................................................

WIP: Allow feature flagging of new header

After a bit of an experiment, if we are happy to roll out the new
notifications icon and margins for inputs at tablet thresholds
we can feature flag switching the search input to a search button
for testing purposes to allow a rollout for Catalan wiki.

TODO:
* Add the feature flag and make it pass the correct value to
minerva.mustache
* Cake

Bug: T156794
Change-Id: If1b014feac263ac5632cbbf797f597e43cf74868
---
M includes/skins/MinervaTemplate.php
M includes/skins/minerva.mustache
M resources/skins.minerva.base.styles/ui.less
3 files changed, 19 insertions(+), 5 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index c713c5d..b8d442f 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -293,6 +293,7 @@
                        'mainmenuhtml' => $this->getMainMenuHtml( $data ),
                        'contenthtml' => $this->getContentWrapperHtml( $data ),
                        'footer' => $this->getFooterTemplateData( $data ),
+                       'isHeaderV2' => true,
                ];
                // begin rendering
                echo $templateParser->processTemplate( 'minerva', $templateData 
);
diff --git a/includes/skins/minerva.mustache b/includes/skins/minerva.mustache
index e108a96..44d9bcf 100644
--- a/includes/skins/minerva.mustache
+++ b/includes/skins/minerva.mustache
@@ -1,5 +1,6 @@
 {{{headelement}}}
-<div id="mw-mf-viewport" class="feature-header-v2">
+<div id="mw-mf-viewport"
+       
class="{{#isHeaderV2}}feature-header-v2{{/isHeaderV2}}{{^isHeaderV2}}feature-header-v1{{/isHeaderV2}}">
        {{>ie8Html5Support}}
        <nav id="mw-mf-page-left" class="navigation-drawer view-border-box">
                {{{mainmenuhtml}}}
@@ -11,19 +12,24 @@
                <div class="header-container header-chrome">
                        <form class="header" action="{{wgScript}}">
                                <div>{{{menuButton}}}</div>
+                               {{#isHeaderV2}}
                                <div class="branding-box">
                                        <h1>
                                                <span>{{{headinghtml}}}</span>
                                                <sup>&beta;</sup>
                                        </h1>
                                </div>
+                               {{/isHeaderV2}}
                                <div class="search-box">
                                        <input class="search" type="search" 
name="search" id="searchInput"
                                           autocomplete="off" 
placeholder="{{placeholder}}"
                                           value="{{search}}">
                                </div>
+                               {{#isHeaderV2}}
                                <div>{{{searchButton}}}</div>
+                               {{/isHeaderV2}}
                                
{{^isAnon}}<div>{{#secondaryButtonData}}{{>secondaryButton}}{{/secondaryButtonData}}</div>{{/isAnon}}
+                               {{^isHeaderV2}}{{#isAnon}}<div><div 
class="mw-ui-icon" /></div>{{/isAnon}}{{/isHeaderV2}}
                        </form>
                </div>
                <div id="content" class="mw-body">
diff --git a/resources/skins.minerva.base.styles/ui.less 
b/resources/skins.minerva.base.styles/ui.less
index 196fdc8..18a9f2f 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -39,9 +39,11 @@
        }
 }
 
-.search-box {
+.header .search-box {
        // FIXME: remove when micro.tap in stable and rule from common-js.less 
too
        -webkit-tap-highlight-color: rgba( 255, 255, 255, 0 );
+       // FIXME: Remove when cache clears
+       width: 100%;
 
        .search {
                @searchIconSize: 20px;
@@ -166,10 +168,15 @@
 .feature-header-v2 {
        .search-box {
                display: none;
+               width: auto;
+       }
+}
 
-               .search {
-                       margin-top: 0;
-               }
+// FIXME: Fold into .header css rules when cache has cleared
+.feature-header-v2,
+.feature-header-v1 {
+       .header .search-box .search {
+               margin-top: 0;
        }
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1b014feac263ac5632cbbf797f597e43cf74868
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: branding
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