Bug 5821 - Add counters to filters
Summary: Add counters to filters
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium enhancement
Target Milestone: 1.6 M4
Assignee: Ravi Chintakunta
QA Contact:
URL:
Whiteboard: GUI design available
Depends on:
Blocks:
 
Reported: 2014-02-13 19:29 UTC by Belen Barros Pena
Modified: 2014-03-19 15:59 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Design - Filter counters (496.75 KB, application/pdf)
2014-02-13 19:29 UTC, Belen Barros Pena
no flags Details
Filter heading with search example (121.72 KB, image/png)
2014-03-10 11:22 UTC, Belen Barros Pena
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Belen Barros Pena 2014-02-13 19:29:21 UTC
Created attachment 1771 [details]
Design - Filter counters

Alex Damien has suggested to add a counter for each filter, so that you know at a glance the general distribution between the different categories and the number of items that will be returned by the filter.

A nice side effect of the counter is that we can use it to disable the filter when the counter is 0, i.e. when it will return no results.

Design spec attached
Comment 1 Ravi Chintakunta 2014-03-10 02:58:04 UTC
Since the filter is applied on the search results (if there is a search string), I believe that the count that is displayed for the various filters should be after the search is applied. 

Can you please confirm? 

And if so, should the filter dialog show that it is being applied on top of the search string.
Comment 2 Belen Barros Pena 2014-03-10 11:22:02 UTC
(In reply to comment #1)
> Since the filter is applied on the search results (if there is a search
> string), I believe that the count that is displayed for the various filters
> should be after the search is applied. 
> 
> Can you please confirm? 

Yes, you are completely right. The counter should reflect the number of results that the filter will return at any given time. So if a filter is applied of top of a search string, the counter should update accordingly to show the numbers contained within the search results. 

> 
> And if so, should the filter dialog show that it is being applied on top of
> the search string.

This is a really good point. Maybe we could use the modal dialog heading. It could be like this:

Filter <number_of_search_results> {{objectname|title}} matching '<search_string>' by '{{tc.name}}

So, for example, if I searched my builds for the string '-minimal' and got 25 results, the filter heading for the Errors filter would say:

Filter 25 Builds matching '_minimal' by 'Errors'

I have attached an example.
Comment 3 Belen Barros Pena 2014-03-10 11:22:32 UTC
Created attachment 1801 [details]
Filter heading with search example
Comment 6 Belen Barros Pena 2014-03-19 15:59:34 UTC
verified in master:ac4ff568f5b2ad4f50a1b7b60797e7b797c314bb