Some filters are defined as being a subset of another filter; for example, ORES filters ORES "likely good faith" contains "very likely good faith", so the filter "very likely good faith" is a subset of "likely good faith".
If a user selects both (or one that is the 'superset') they have an indication that toggles the greying-out of the filter item in the list and in the capsule item area. We need to make sure the model understands this property and can analyze it properly for the UI.
More specifically, the behavior includes:
- Filter list:
- Filters that are a ‘subset’ of another selected filters are displayed as inactive/grey in the list (but can STILL be selected!)
- Capsule items:
- Filters that are a ‘subset’ of another selected filters and are in the capsule item list (meaning the filter is also selected) are displayed as inactive/grey
- Tooltip text states the greyed out filter is included in the results by name of the other filter whos the superset
And in the data model:
- FilterItems: Must store a list of “subsets”, which it will get from the backend definition (see T152754: Configure filters in a single extensible place for that definition)
- ViewModel: The viewmodel should be able to produce a combined list of anything that includes filterX as a subset, and should answer the question “isFilterAlreadyIncluded” (or something like this) for any given filter, to make sure the UI can represent its state correctly (both in tooltip and in the visual 'active' / 'inactive' capsule state)