View Issue Details

IDProjectCategoryView StatusLast Update
0021833mantisbtfilterspublic2019-12-05 07:19
Reporterjensberke Assigned To 
Status newResolutionopen 
Summary0021833: Highlight or emphasize the set filters in the filter form for easier visual recognition of what's being filtered

In the filter form it's hard to see which filters have a value which filter the result, and which filters are set to a value which doesn't filter the results.

It'd be great if a filter's value and its name are highlighted or emphasized somehow if the filter is set. Rendering it in bold would probably suffice (or in Mantis 2.0 with the new GUI a different background colour might good).

"Show" and "Highlight changed" should probably be excluded from this because they don't filter records from the result.


These are displayed in normal style:

Hide Status:


These are displayed in bold:

<b>Hide Status:
closed (And Above)</b>


TagsNo tags attached.


related to 0016854 new Simplify the filter box at the top of the View Issues page 
has duplicate 0022603 closeddregad Filter: highligt modified once (with not default value) 
has duplicate 0025790 closedatrol highlight active filters 




2017-02-22 08:14

reporter   ~0055740

I appended a screenshot which shows how it could look like.

The screenshot was actually created from a real Mantis installation because I wrote myself a little Mantis plugin which does the filter colouring in a very simple way: it adds an EVENT_LAYOUT_RESOURCES hook which uses jQuery to evaluate the values of the filter's hidden input fields after the page has loaded. Depending on the hidden input field's values an additional CSS class is added to the input's parent. This is just a workaround, though, because I think it'd be better if Mantis itself would add a CSS class to active filters.

mantis-21833.png (27,824 bytes)   
mantis-21833.png (27,824 bytes)   


2017-02-22 11:22

developer   ~0055745

I think this would be quite a useful improvement for the UI indeed.



2017-02-22 14:51

reporter   ~0055750

From my experience with the filters, this should be the rules to decide if a filter is highlighted or not:

First, these filters should not be highlighted at all because they have no impact on the result set itself, only on the way the result set is displayed:
<li>Sort by
<li>Highlight Changed
<li>Show Sticky Issues

Then all other fields should be highlighted if their filter value is:
<li>for numeric values: != 0 (not just > 0 because of negative values like META_FILTER_NONE which does filter the result set)
<li>for string values: not empty

One exception is "Hide Status" where "none" does not filter the result set and should therefore not be highlighted.



2017-03-29 06:07

reporter   ~0056254

maybe the simple question for highlighting is only:
does filter use default value or not?

imho this should be applied



2017-03-29 06:23

reporter   ~0056257

If the highlight would based on the question "does filter use default value or not?" then the "Hide Status" filter would <i>not</i> be highlighted if it's using the default value "closed (and above)". I think that'd be inconsistent behaviour, because the filter <i>is</i> active and has an impact on the overall result set. The question is rather: is there any active filter which removes records from the overall, filter-less results set? If so, highlight it.

Including the search field as well in the highlighting is a good idea though.



2017-03-29 07:19

reporter   ~0056259

"is there any active filter which removes records from the overall, filter-less results set? If so, highlight it." => perfect !



2017-03-29 07:21

reporter   ~0056260

btw: would vote for a good visible highlighting (not to decent)



2017-03-30 03:47

developer   ~0056275

There is a plan to rebuild the filter UI so that only the modified fields are shown, and new fields would be added selectively, instead of showing all

You proposal for highlihting is based in the same premises. Once the relevant fields (modified) can be detected, having them highlighted or implemented as the new UI, ther is not much different internally.
However, as you have anticipated there are some issues that must be resolver internally first:

  • Redefine what is a default filter, and an empty filter
  • Have a way to differentiate the fieds that are modified by the user (even if they are the default value)
  • Decouple fields that are not purely relevant to a filter: show sticky, highlight recent, etc
  • Differentiate meta values from explicit values. For some field, does "0" mean "any" or the numeric value?

Imho those changes should be implemented solidly before implementing this idea.
Filter api is quite complex. Recently a big refactor to clean up code has been implemented. Additional improvements are planed to address all these issues, but won't come immediatly.



2018-07-09 04:57

reporter   ~0060230

Further to review with some users, a complementary "filter" input has been suggested, in addition to the above proposals:

  • Use the View page columns (via right click for instance) to open a filter on the columns displayed in the view page. This allows the user to have an immedaite access to the fields of interest for him.

I am not sure if this idea should be input in the current issue or in issue # 0016854.
Do you have a rough idea in which version the highlight filter in intended ?