From 633c48bddfd7de25ea752ce89252c04ae39294fd Mon Sep 17 00:00:00 2001 From: Jan Drewniak Date: Wed, 11 Sep 2019 14:19:47 +0200 Subject: [PATCH] Utilize the mw-ui-icon-flush-left/right classes to align icons Affected icons: - hamburger menu - "search|notifications|user" menu in page header - notification "circle" icon - page actions menu - section edit icon Bug: T229440 Change-Id: I5587855d0d9ecf2fac20ce16845e6749c26ab7c2 --- includes/menu/Main/MainMenuDirector.php | 4 +++- includes/menu/PageActions/PageActionsDirector.php | 2 +- includes/menu/PageActions/ToolbarBuilder.php | 2 +- includes/skins/SkinMinerva.php | 4 +++- includes/skins/minerva.mustache | 2 +- resources/skins.minerva.base.styles/footer.less | 1 + resources/skins.minerva.base.styles/pageactions.less | 6 ++++++ .../skins.minerva.base.styles/print/header.less | 1 + resources/skins.minerva.base.styles/ui.less | 10 +--------- resources/skins.minerva.base.styles/userMenu.less | 12 +++++++----- resources/skins.minerva.loggedin.styles/styles.less | 1 + skinStyles/mediawiki.ui.icon/mediawiki.ui.icon.less | 5 +++++ skinStyles/mobile.startup/Overlay.less | 4 ++++ 13 files changed, 35 insertions(+), 19 deletions(-) diff --git a/includes/menu/Main/MainMenuDirector.php b/includes/menu/Main/MainMenuDirector.php index ed8dc2a47..214bbc99c 100644 --- a/includes/menu/Main/MainMenuDirector.php +++ b/includes/menu/Main/MainMenuDirector.php @@ -113,7 +113,9 @@ final class MainMenuDirector { return Html::element( 'a', [ 'title' => $title, 'href' => $url, - 'class' => MinervaUI::iconClass( 'mainmenu', 'element', 'main-menu-button' ), + 'class' => MinervaUI::iconClass( + 'mainmenu', 'element', 'main-menu-button mw-ui-icon-flush-left' + ), 'data-event-name' => 'ui.mainmenu', 'id' => 'mw-mf-main-menu-button', ], $tooltip ); diff --git a/includes/menu/PageActions/PageActionsDirector.php b/includes/menu/PageActions/PageActionsDirector.php index 44fe73c2e..874750e3a 100644 --- a/includes/menu/PageActions/PageActionsDirector.php +++ b/includes/menu/PageActions/PageActionsDirector.php @@ -80,7 +80,7 @@ final class PageActionsDirector { 'item-id' => 'page-actions-overflow', 'checkboxID' => 'page-actions-overflow-checkbox', 'toggleID' => 'page-actions-overflow-toggle', - 'toggleClass' => MinervaUI::iconClass( 'page-actions-overflow' ), + 'toggleClass' => MinervaUI::iconClass( 'page-actions-overflow', 'element' ), 'listClass' => 'page-actions-overflow-list toggle-list__list--drop-down', 'text' => $this->messageLocalizer->msg( 'minerva-page-actions-overflow' ), 'analyticsEventName' => 'ui.overflowmenu', diff --git a/includes/menu/PageActions/ToolbarBuilder.php b/includes/menu/PageActions/ToolbarBuilder.php index 00b1c0fcd..b336eb90c 100644 --- a/includes/menu/PageActions/ToolbarBuilder.php +++ b/includes/menu/PageActions/ToolbarBuilder.php @@ -115,7 +115,7 @@ class ToolbarBuilder { $this->title, $this->languagesHelper->doesTitleHasLanguagesOrVariants( $this->title ), $this->messageLocalizer, - MinervaUI::iconClass( 'language-switcher', 'element', '' ) ) + MinervaUI::iconClass( 'language-switcher', 'element' ) ) ); } diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 1c5e3bf97..8444fac51 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -240,7 +240,9 @@ class SkinMinerva extends SkinTemplate { 'data-section' => $section, // Note visibility of the edit section link button is controlled by .edit-page in ui.less so // we default to enabled even though this may not be true. - 'class' => MinervaUI::iconClass( 'edit-enabled', 'element', 'edit-page' ), + 'class' => MinervaUI::iconClass( + 'edit-enabled', 'element', 'edit-page mw-ui-icon-flush-right' + ), ], $message ); $html .= Html::closeElement( 'span' ); return $html; diff --git a/includes/skins/minerva.mustache b/includes/skins/minerva.mustache index 1e6e002f0..dd5442cec 100644 --- a/includes/skins/minerva.mustache +++ b/includes/skins/minerva.mustache @@ -21,7 +21,7 @@