Bmansurov has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/335706 )
Change subject: Convey beta mode through site branding ...................................................................... Convey beta mode through site branding Bug: T152526 Change-Id: Iba2ed4cf19f483aa91eba927e93b7ab95faa012c --- M extension.json M includes/skins/MinervaTemplate.php M includes/skins/SkinMinerva.php M includes/skins/minerva.mustache A resources/skins.minerva.icons.images.beta/beta.svg 5 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/06/335706/1 diff --git a/extension.json b/extension.json index a32cfa7..d79b540 100644 --- a/extension.json +++ b/extension.json @@ -195,6 +195,13 @@ "arrow": "resources/skins.minerva.icons.images.variants/arrow.svg" } }, + "skins.minerva.icons.images.beta": { + "class": "ResourceLoaderImageModule", + "selector": ".mw-ui-icon-{name}:before", + "images": { + "beta": "resources/skins.minerva.icons.images.beta/beta.svg" + } + }, "mobile.overlay.images": { "selectorWithoutVariant": ".mw-ui-icon-{name}:before", "selectorWithVariant": ".mw-ui-icon-{name}-{variant}:before", diff --git a/includes/skins/MinervaTemplate.php b/includes/skins/MinervaTemplate.php index c713c5d..18f5ed0 100644 --- a/includes/skins/MinervaTemplate.php +++ b/includes/skins/MinervaTemplate.php @@ -284,6 +284,8 @@ 'headelement' => $data[ 'headelement' ], 'menuButton' => $data['menuButton'], 'headinghtml' => $data['footer-site-heading-html'], + 'betaIconClass' => MobileUI::iconClass( 'beta' ), + 'isBetaGroupMember' => $data['isBetaGroupMember'], 'searchButton' => Html::rawElement( 'a', [ 'href' => SpecialPage::getTitleFor( 'Search' )->getLocalURL(), 'id' => 'searchIcon', diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index e2097c5..c50ab13 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -92,6 +92,8 @@ // Set the links for page secondary actions $tpl->set( 'secondary_actions', $this->getSecondaryActions( $tpl ) ); + $tpl->set( 'isBetaGroupMember', $this->mobileContext->isBetaGroupMember() ); + // Construct various Minerva-specific interface elements $this->preparePageContent( $tpl ); $this->prepareHeaderAndFooter( $tpl ); @@ -1324,6 +1326,9 @@ if ( $this->isFooterV2() ) { $styles[] = 'skins.minerva.footerV2.styles'; } + if ( $this->mobileContext->isBetaGroupMember() ) { + $styles[] = 'skins.minerva.icons.images.beta'; + } return $styles; } diff --git a/includes/skins/minerva.mustache b/includes/skins/minerva.mustache index 9ec03a0..dcdf4c6 100644 --- a/includes/skins/minerva.mustache +++ b/includes/skins/minerva.mustache @@ -14,6 +14,9 @@ <div class="branding-box"> <h1> <span>{{{headinghtml}}}</span> + {{#isBetaGroupMember}} + <span class="{{betaIconClass}}"></span> + {{/isBetaGroupMember}} </h1> </div> <div class="search-box"> diff --git a/resources/skins.minerva.icons.images.beta/beta.svg b/resources/skins.minerva.icons.images.beta/beta.svg new file mode 100644 index 0000000..aeff8e1 --- /dev/null +++ b/resources/skins.minerva.icons.images.beta/beta.svg @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <g id="Group" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> + <circle id="base" fill="#FFFFFF" cx="11" cy="11" r="11"></circle> + <path d="M10.1308594,9.95507812 L10.1308594,8.93652344 L10.7255859,8.93652344 C11.9697266,8.93652344 12.6259766,8.35546875 12.6259766,7.25488281 C12.6259766,6.3046875 11.921875,5.69628906 10.8691406,5.69628906 C9.60449219,5.69628906 8.98242188,6.47558594 8.98242188,8.09570312 L8.98242188,11.3222656 C8.98242188,12.9970703 9.75488281,14.0087891 11.265625,14.0087891 C12.5302734,14.0087891 13.2753906,13.1953125 13.2753906,12.0605469 C13.2753906,10.7070312 12.3867188,9.95507812 10.7050781,9.95507812 L10.1308594,9.95507812 Z M7.80664062,7.97265625 C7.80664062,5.82617188 8.90039062,4.63671875 10.8349609,4.63671875 C12.6738281,4.63671875 13.8085938,5.59375 13.8085938,7.1796875 C13.8085938,8.17773438 13.2548828,8.95703125 12.2773438,9.33984375 L12.2773438,9.35351562 C13.7333984,9.6953125 14.4921875,10.6318359 14.4921875,12.0195312 C14.4921875,13.796875 13.2480469,15.0683594 11.4228516,15.0683594 C10.2949219,15.0683594 9.46777344,14.6103516 9.0234375,13.8037109 L8.99609375,13.8037109 L8.99609375,17.4609375 L7.80664062,17.4609375 L7.80664062,7.97265625 Z" id="β" fill="#54595D"></path> + </g> +</svg> -- To view, visit https://gerrit.wikimedia.org/r/335706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iba2ed4cf19f483aa91eba927e93b7ab95faa012c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: branding Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits