Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/306796
Change subject: Clear icon should be small
......................................................................
Clear icon should be small
Additional changes:
* Client side Icon now supports isSmall property
Bug: T143262
Change-Id: I837957287ad3b648fe53b3db4ab332dd0a042d07
---
M resources/mobile.search/SearchOverlay.js
M resources/mobile.startup/Icon.js
M resources/mobile.startup/icon.hogan
3 files changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/96/306796/1
diff --git a/resources/mobile.search/SearchOverlay.js
b/resources/mobile.search/SearchOverlay.js
index 6f25977..8fe1568 100644
--- a/resources/mobile.search/SearchOverlay.js
+++ b/resources/mobile.search/SearchOverlay.js
@@ -64,6 +64,7 @@
clearIcon: new Icon( {
tagName: 'button',
name: 'clear',
+ isSmall: true,
label: mw.msg( 'mobile-frontend-clear-search' ),
additionalClassNames: 'clear'
} ).options,
diff --git a/resources/mobile.startup/Icon.js b/resources/mobile.startup/Icon.js
index 6f6de07..afee83b 100644
--- a/resources/mobile.startup/Icon.js
+++ b/resources/mobile.startup/Icon.js
@@ -23,6 +23,7 @@
/**
* @cfg {Object} defaults Default options hash.
* @cfg {Boolean} defaults.hasText Whether the icon has text.
+ * @cfg {Boolean} defaults.isSmall Whether the icon should be
small.
* @cfg {String} [defaults.href] value of href attribute, when
set tagName will default to anchor tag
* @cfg {String} defaults.tagName The name of the tag in which
the icon is wrapped. Defaults to 'a' when href option present.
* @cfg {String} defaults.base String used as a base for
generating class names.
@@ -36,6 +37,7 @@
hasText: false,
href: undefined,
tagName: 'div',
+ isSmall: false,
base: 'mw-ui-icon',
name: '',
modifier: 'mw-ui-icon-element',
diff --git a/resources/mobile.startup/icon.hogan
b/resources/mobile.startup/icon.hogan
index 463db62..c31f96e 100644
--- a/resources/mobile.startup/icon.hogan
+++ b/resources/mobile.startup/icon.hogan
@@ -1,4 +1,4 @@
-<{{tagName}} class="{{base}} {{base}}-{{name}} {{modifier}}
{{additionalClassNames}}"
+<{{tagName}} class="{{base}} {{base}}-{{name}} {{modifier}}
{{#isSmall}}mw-ui-icon-small{{/isSmall}} {{additionalClassNames}}"
{{#id}}id="{{id}}"{{/id}}
{{#href}}href="{{href}}"{{/href}}
{{#title}}title="{{title}}"{{/title}}>{{label}}</{{tagName}}>
--
To view, visit https://gerrit.wikimedia.org/r/306796
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I837957287ad3b648fe53b3db4ab332dd0a042d07
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits