Bartosz Dziewoński has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/393953 )
Change subject: ui.SearchPreview: Simplify label display
......................................................................
ui.SearchPreview: Simplify label display
The entire thing is a label, so just put it in the 'label' config option?
I have no idea why you went to such lengths to do this differently.
Change-Id: I1f7b36cc7d68cb98eba4a6d12bd488e6e81bda0a
---
M modules/ext.advancedSearch.css
M modules/ui/ext.advancedSearch.SearchPreview.js
2 files changed, 8 insertions(+), 26 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AdvancedSearch
refs/changes/53/393953/1
diff --git a/modules/ext.advancedSearch.css b/modules/ext.advancedSearch.css
index 47ecf75..75312ac 100644
--- a/modules/ext.advancedSearch.css
+++ b/modules/ext.advancedSearch.css
@@ -9,27 +9,13 @@
margin-right: 0.3125em;
}
-.mw-advancedSearch-searchPreview-previewPill {
- display: inline-flex;
- display: -ms-inline-flexbox;
- flex-flow: row nowrap;
- -ms-flex-direction: row;
- flex: 0 1 auto;
-}
-
-.mw-advancedSearch-searchPreview-previewPill > .oo-ui-labelElement-label {
- order: 1;
- -ms-flex-order: 1;
-}
-
-.mw-advancedSearch-searchPreview-previewPill > .content {
+.mw-advancedSearch-searchPreview-previewPill > .oo-ui-labelElement-label >
.mw-advancedSearch-searchPreview-content {
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
max-width: 5em;
- order: 2;
- -ms-flex-order: 2;
padding-left: 0.3em;
+ vertical-align: bottom;
}
.mw-advancedSearch-fieldContainer {
diff --git a/modules/ui/ext.advancedSearch.SearchPreview.js
b/modules/ui/ext.advancedSearch.SearchPreview.js
index c7af82e..3d8beda 100644
--- a/modules/ui/ext.advancedSearch.SearchPreview.js
+++ b/modules/ui/ext.advancedSearch.SearchPreview.js
@@ -111,16 +111,12 @@
mw.libs.advancedSearch.ui.SearchPreview.prototype.generateTag =
function ( optionId, value ) {
var formattedValue = this.formatValue( optionId, value ),
tag = new OO.ui.TagItemWidget( {
- label: mw.msg( 'advancedsearch-field-' +
optionId ),
- content: [
- new OO.ui.HtmlSnippet(
- $( '<span>' ) // redundant
span to cover browsers without support for bdi tag
- .addClass( 'content' )
- .append(
- $( '<bdi>'
).text( formattedValue )
- )
- )
- ]
+ label: $()
+ .add( $( '<span>' ).text( mw.msg(
'advancedsearch-field-' + optionId ) ) )
+ // redundant span to cover browsers
without support for bdi tag
+ .add( $( '<span>' ).addClass(
'mw-advancedSearch-searchPreview-content' ).append(
+ $( '<bdi>' ).text(
formattedValue )
+ ) )
} );
tag.toggleDraggable( false ); // constructor config has no
effect; https://phabricator.wikimedia.org/T172781
--
To view, visit https://gerrit.wikimedia.org/r/393953
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f7b36cc7d68cb98eba4a6d12bd488e6e81bda0a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AdvancedSearch
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits