jenkins-bot has submitted this change and it was merged. Change subject: Show a missing search icon in alpha ......................................................................
Show a missing search icon in alpha * Remove the search-white icon and use ResourceLoaderImageModule to create an inverted version of the icon. * Create a gray variant of the search icon and use it in the alpha header (since the default is black now) * Fix the padding around the icon to center the icon vertically. Bug: T101145 Change-Id: Ieba2bab1395445e5cdec307128c6d30f3b6ff3a8 --- M images/icons/magnifying-glass.svg D images/icons/search-white.svg M includes/Resources.php M includes/skins/MinervaTemplateAlpha.php M resources/mobile.special.mobilemenu.styles/mobilemenu.less 5 files changed, 25 insertions(+), 78 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/images/icons/magnifying-glass.svg b/images/icons/magnifying-glass.svg index edc0656..8c375d0 100644 --- a/images/icons/magnifying-glass.svg +++ b/images/icons/magnifying-glass.svg @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" enable-background="new 0 0 612 792"> - <path d="M3.065 16.536c1.765 1.766 4.073 2.732 6.583 2.732 2.187 0 4.25-.744 5.913-2.112l6.76 6.112s1.518-.398 1.89-2.086l-6.78-6.135c2.385-3.63 1.964-8.498-1.193-11.655C14.47 1.626 12.162.66 9.677.66c-2.488 0-4.823.97-6.585 2.71-3.656 3.647-3.63 9.537-.027 13.166zm1.54-11.11c.073-.1.175-.198.272-.272C6.17 3.887 7.86 3.166 9.672 3.166c1.812 0 3.504.72 4.794 1.988 2.635 2.635 2.66 6.934-.023 9.593-1.29 1.29-2.982 1.988-4.795 1.988-1.812 0-3.504-.72-4.794-1.988-2.534-2.534-2.66-6.634-.25-9.32z" id="path4" fill="#555"/> + <path d="M3.065 16.536c1.765 1.766 4.073 2.732 6.583 2.732 2.187 0 4.25-.744 5.913-2.112l6.76 6.112s1.518-.398 1.89-2.086l-6.78-6.135c2.385-3.63 1.964-8.498-1.193-11.655C14.47 1.626 12.162.66 9.677.66c-2.488 0-4.823.97-6.585 2.71-3.656 3.647-3.63 9.537-.027 13.166zm1.54-11.11c.073-.1.175-.198.272-.272C6.17 3.887 7.86 3.166 9.672 3.166c1.812 0 3.504.72 4.794 1.988 2.635 2.635 2.66 6.934-.023 9.593-1.29 1.29-2.982 1.988-4.795 1.988-1.812 0-3.504-.72-4.794-1.988-2.534-2.534-2.66-6.634-.25-9.32z" id="path4" /> </svg> diff --git a/images/icons/search-white.svg b/images/icons/search-white.svg deleted file mode 100644 index 7db1f3b..0000000 --- a/images/icons/search-white.svg +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - viewBox="0 0 48 48" - enable-background="new 0 0 612 792" - id="svg2" - version="1.1" - inkscape:version="0.48.2 r9819" - sodipodi:docname="search-white.svg" - width="100%" - height="100%"> - <metadata - id="metadata10"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <defs - id="defs8" /> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1440" - inkscape:window-height="788" - id="namedview6" - showgrid="false" - inkscape:zoom="6.5103448" - inkscape:cx="-3.5861991" - inkscape:cy="24.3892" - inkscape:window-x="103" - inkscape:window-y="1102" - inkscape:window-maximized="1" - inkscape:current-layer="svg2" /> - <path - d="m 5.9311042,33.828283 c 3.4706671,3.662023 8.0063058,5.666818 12.9403248,5.666818 4.298119,0 8.351079,-1.544017 11.622536,-4.38148 l 13.285099,12.675573 c 0,0 2.980331,-0.824561 3.715845,-4.324884 L 34.163842,30.740229 C 38.852704,23.214121 38.025252,13.117315 31.819412,6.5693597 28.348745,2.9073559 23.813126,0.90254115 18.925055,0.90254115 c -4.88805,0 -9.4773151,2.01288315 -12.9403242,5.61831035 C -1.2017817,14.0874 -1.1481551,26.302174 5.9312028,33.828283 z m 3.026299,-23.039125 c 0.1455439,-0.210189 0.3447732,-0.41227 0.5363247,-0.565882 2.5436191,-2.6272549 5.8610651,-4.1227828 9.4236701,-4.1227828 3.562623,0 6.887727,1.4955279 9.423689,4.1227828 5.179197,5.464737 5.225165,14.381269 -0.04591,19.894495 -2.535963,2.675781 -5.861066,4.122801 -9.423689,4.122801 -3.562604,0 -6.887708,-1.495527 -9.4236896,-4.122801 C 4.4678108,24.863242 4.2226522,16.358961 8.9574617,10.789158 z" - id="path4" - inkscape:connector-curvature="0" - style="fill:#555555" /> - <path - style="fill:#ffffff" - d="m 37.17213,41.363593 -6.631278,-6.335207 -1.257891,0.908663 C 21.09956,41.848498 10.324188,40.001614 4.3116588,31.657001 3.1796392,30.085907 1.8799998,27.310413 1.334708,25.299503 0.82014652,23.401941 0.62830197,19.190485 0.95813003,17.033172 1.8890254,10.944431 5.7090373,5.600408 11.040616,2.92824 c 2.922523,-1.4647782 4.226968,-1.7591873 7.81411,-1.7636025 3.591341,-0.00391 5.179432,0.3385607 7.848747,1.6951089 7.772752,3.9501222 11.840891,12.9942066 9.825587,21.8437296 -0.295777,1.29874 -1.469291,4.255979 -2.372642,5.979005 -0.03399,0.06506 2.906329,2.951905 6.534223,6.415383 3.627874,3.463478 6.596151,6.430505 6.596151,6.593417 0,1.073547 -1.316871,2.857917 -2.619128,3.548928 l -0.864258,0.45861 -6.631276,-6.335226 z M 22.043663,33.921509 c 4.762805,-1.22638 8.805157,-5.50926 9.899628,-10.488701 0.387498,-1.763016 0.38195,-4.917843 -0.01172,-6.633835 C 31.763363,16.065412 31.276934,14.705287 30.850734,13.776502 30.21921,12.400222 29.759565,11.752503 28.366328,10.275593 26.905418,8.7269272 26.397557,8.3313992 24.874034,7.5558158 20.366703,5.261222 15.821824,5.5418583 11.605444,8.3751014 5.86179,12.234635 3.8953638,19.851762 6.9310207,26.481847 c 1.6035234,3.502238 4.9189563,6.346089 8.5776393,7.357552 1.754537,0.485061 4.820436,0.523587 6.534964,0.08205 z" - id="path3363" - inkscape:connector-curvature="0" /> -</svg> diff --git a/includes/Resources.php b/includes/Resources.php index d92732a..2292cbf 100644 --- a/includes/Resources.php +++ b/includes/Resources.php @@ -163,9 +163,6 @@ 'selector' => '.mw-ui-icon-{name}:before', 'position' => 'bottom', 'images' => array( - // chrome - 'search-white' => 'images/icons/search-white.svg', - // toggling 'arrow-down' => 'images/icons/arrow-down.svg', 'arrow-up' => 'images/icons/arrow-up.svg', @@ -268,17 +265,30 @@ 'search' => 'images/icons/magnifying-glass.svg', ), ), - // FIXME: remove this module when Gather stops using it 'skins.minerva.alpha.images' => $wgMFResourceFileModuleBoilerplate + array( - 'position' => 'bottom', - 'class' => 'ResourceLoaderImageModule', - 'selector' => '.mw-ui-icon-{name}:before', - 'images' => array( - // Special:MobileMenu-specific back icon - 'back-mobilemenu' => 'images/icons/alpha/back-ltr.svg', - 'search' => 'images/icons/magnifying-glass.svg', + 'position' => 'bottom', + 'class' => 'ResourceLoaderImageModule', + 'selectorWithoutVariant' => '.mw-ui-icon-{name}:before', + 'selectorWithVariant' => '.mw-ui-icon-{name}-{variant}:before', + 'variants' => array( + 'gray' => array( + 'color' => '#555555', ), + 'invert' => array( + 'color' => '#FFFFFF', + ) ), + 'images' => array( + // Special:MobileMenu-specific back icon + 'back-mobilemenu' => 'images/icons/alpha/back-ltr.svg', + 'search' => array( + 'file' => array( + 'default' => 'images/icons/magnifying-glass.svg', + ), + 'variants' => array( 'gray', 'invert' ), + ) + ), + ), ); $wgResourceModules = array_merge( $wgResourceModules, array( diff --git a/includes/skins/MinervaTemplateAlpha.php b/includes/skins/MinervaTemplateAlpha.php index 76368e6..a592b96 100644 --- a/includes/skins/MinervaTemplateAlpha.php +++ b/includes/skins/MinervaTemplateAlpha.php @@ -57,7 +57,7 @@ $templateParser = new TemplateParser( __DIR__ ); $args = array( 'siteName' => SkinMinerva::getSitename(), - 'mobileMenuClass' => MobileUI::iconClass( 'search', 'element', 'header-icon' ), + 'mobileMenuClass' => MobileUI::iconClass( 'search-gray', 'element', 'header-icon' ), 'mobileMenuLink' => SpecialPage::getTitleFor( 'MobileMenu' )->getLocalUrl(), 'mobileMenuTitle' => wfMessage( 'mobile-frontend-main-menu' )->parse(), 'secondaryButton' => $data['secondaryButton'], @@ -84,8 +84,7 @@ ) ) . Html::openElement( 'div', array( - // FIXME: If this ever makes it to stable replace with search-inverted - 'class' => MobileUI::iconClass( 'search-white', 'element', + 'class' => MobileUI::iconClass( 'search-invert', 'element', 'fulltext-search no-js-only' ), ) ) . $this->makeSearchButton( 'fulltext' ) . diff --git a/resources/mobile.special.mobilemenu.styles/mobilemenu.less b/resources/mobile.special.mobilemenu.styles/mobilemenu.less index 5f3f34e..a083f9a 100644 --- a/resources/mobile.special.mobilemenu.styles/mobilemenu.less +++ b/resources/mobile.special.mobilemenu.styles/mobilemenu.less @@ -48,7 +48,7 @@ border-radius: .2em; float: right; margin: 0; - padding: .35em 0; + padding: .25em 0 .65em; background-color: @colorProgressive; cursor: pointer; -- To view, visit https://gerrit.wikimedia.org/r/223446 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieba2bab1395445e5cdec307128c6d30f3b6ff3a8 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org> Gerrit-Reviewer: BarryTheBrowserTestBot <jdlrobson+ba...@gmail.com> Gerrit-Reviewer: Bmansurov <bmansu...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Phuedx <g...@samsmith.io> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits