Bmansurov has uploaded a new change for review.
https://gerrit.wikimedia.org/r/288193
Change subject: Search boxes fixes
......................................................................
Search boxes fixes
* Reserve space equal to the icon gutter width to the right of the
search bar if the secondary header icon is missing. Otherwise,
the search bar would touch the right border of the page on small
screens;
* Remove the space to the left of the search bar since the icon to
the left of it already has a 1em gutter around it.
* Regression fix: all overlay headers were added a background color
in I0c8ff9941dd7a78e416d8067b8ab5e1b8e018aa9. Only add this color
to the search overlay to be consistent with the page header. Other
overlay headers will get their white backgrounds back.
The above fixes are Nirzar's suggestions - design approved.
Bug: T129955
Change-Id: Idb8108cfe4cf775baac516dacccb7b9737bc518c
---
M includes/skins/MinervaTemplate.php
M includes/skins/minerva.mustache
M resources/mobile.overlays/Overlay.less
M resources/mobile.search/SearchOverlay.less
M resources/skins.minerva.base.styles/ui.less
5 files changed, 16 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/93/288193/1
diff --git a/includes/skins/MinervaTemplate.php
b/includes/skins/MinervaTemplate.php
index 60be3b6..8c2d62f 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -333,6 +333,7 @@
'banners' => $data['banners'],
'headelement' => $data[ 'headelement' ],
'headerhtml' => $this->getHeaderHtml( $data ),
+ 'doesHeaderHaveSecondaryButton' => (bool)
$data['secondaryButton'],
'mainmenuhtml' => $this->getMainMenuHtml( $data ),
'contenthtml' => $this->getContentWrapperHtml( $data ),
'footerhtml' => $this->getFooterHtml( $data ),
diff --git a/includes/skins/minerva.mustache b/includes/skins/minerva.mustache
index 4cfa12f..d03ce62 100644
--- a/includes/skins/minerva.mustache
+++ b/includes/skins/minerva.mustache
@@ -8,7 +8,7 @@
{{>banners}}
</div>
<div class="header-container">
- <div class="header">
+ <div class="header
{{^doesHeaderHaveSecondaryButton}}no-secondary-button{{/doesHeaderHaveSecondaryButton}}">
{{{headerhtml}}}
</div>
</div>
diff --git a/resources/mobile.overlays/Overlay.less
b/resources/mobile.overlays/Overlay.less
index 3a2b7f3..0a96d87 100644
--- a/resources/mobile.overlays/Overlay.less
+++ b/resources/mobile.overlays/Overlay.less
@@ -204,7 +204,7 @@
}
.overlay-title {
- padding: .15em @headerTitlePaddingH 0;
+ padding: .15em 0;
}
.overlay-action {
diff --git a/resources/mobile.search/SearchOverlay.less
b/resources/mobile.search/SearchOverlay.less
index 115b4f7..76a8d15 100644
--- a/resources/mobile.search/SearchOverlay.less
+++ b/resources/mobile.search/SearchOverlay.less
@@ -136,16 +136,18 @@
// FIXME: T134894
.beta {
- .overlay-header-container {
- background-color: @chromeColor;
- }
-
.search-overlay {
+ .overlay-header-container {
+ background-color: @chromeColor;
+ }
+
.overlay-header {
background-color: transparent;
}
.overlay-title {
+ // we need to add the same space as the close icon
gutter
+ padding-right: @iconGutterWidth;
// because the clear icon is absolutely positioned
position: relative;
}
diff --git a/resources/skins.minerva.base.styles/ui.less
b/resources/skins.minerva.base.styles/ui.less
index 7e78d93..e9e71a2 100644
--- a/resources/skins.minerva.base.styles/ui.less
+++ b/resources/skins.minerva.base.styles/ui.less
@@ -77,7 +77,7 @@
// Search
> form {
- padding: .15em @headerTitlePaddingH 0;
+ padding: .15em 0;
width: auto;
vertical-align: middle;
}
@@ -86,6 +86,12 @@
vertical-align: middle;
}
+ &.no-secondary-button {
+ > form {
+ // we need to add the same space as the hamburger icon
gutter if no bell icon is present
+ padding-right: @iconGutterWidth;
+ }
+ }
}
// Make search input more visible for users on small screens.
--
To view, visit https://gerrit.wikimedia.org/r/288193
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb8108cfe4cf775baac516dacccb7b9737bc518c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits