RCFilters: Fix saved filter name truncation for Firefox
authorMoriel Schottlender <moriel@gmail.com>
Wed, 20 Jun 2018 22:14:23 +0000 (15:14 -0700)
committerSbisson <sbisson@wikimedia.org>
Fri, 22 Jun 2018 17:50:16 +0000 (17:50 +0000)
commitc6bc5a257d7647b5c089bfa6dbda89711dac85ef
tree3f4488a0f0deac874acce070c916a19587f601b9
parent9d914bed085df2ef681762c5c476c49fc495d4aa
RCFilters: Fix saved filter name truncation for Firefox

Firefox seem to have a bit of trouble with variable-width flexbox
div that need to be truncated with an ellipses.

This fix includes a couple of changes:
* Split the three elements of the title into three separate divs,
  and define the flex divs properly for a variable-width one in
  the middle.
* Taking advantage of #1, clean up the class names too (move to
  under '-top-xxx' classes for better organization in the LESS
  file too.
* Add a max-width: 100% rule to the label that gets
  truncated; this seems to force Firefox to recalculate its proper
  width while in flexbox and actually add the ellipses.

Bug: T197835
Change-Id: Ibe2002a5fe9006f262b2256cae222fed9e9a8fd0
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterTagMultiselectWidget.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js