RCFilters: Invert the muted state of inverted namespace options
authorMoriel Schottlender <moriel@gmail.com>
Wed, 21 Jun 2017 21:16:51 +0000 (14:16 -0700)
committerMoriel Schottlender <moriel@gmail.com>
Mon, 26 Jun 2017 22:03:01 +0000 (15:03 -0700)
commit4962ccf430d693278942bdc356a09ee3e2c39269
treeac973c23fb4d8ffb100fdc8a9df40401b039b9d6
parent7697f1f1209af237e58931e6970179ccd2687418
RCFilters: Invert the muted state of inverted namespace options

Since the inversion happened, the background of selected items was
overridden by "muted" background, so we had to change a few more
details to get things to work properly:
- Override selected color even if the item is muted (previously,
  'selected' cannot be muted by definition, but this patch changes
  that and hence needs to make sure selected color overrides the
  muted color state)
- Set correct muted state on the namespace items to be reversed.
- The highlight/select/mute background issue exposed a secondary
  issue when switching views by clicking the 'tag' item, whereby
  the change of view itself causes the input to empty, and triggers
  the updateItemVisibility in MenuSelectWidget, which then selects
  the first item. This shouldn't happen when the user is actively
  selecting an item from the tags, so a method of recognizing that
  the user is actively selecting an item was added.

Change-Id: Idf5c2232216ad6a38b29bbc103bbca66f56533b7
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterMenuOptionWidget.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuOptionWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js