Comment 11 for bug 1649183

Revision history for this message
Alok Kumar (rajalokan) wrote :

Hi I would like to work on this and need your view on ideal UX for this flow. In my view problem and its resolution can be summerized as

Assumptions:
============
* For the context of this discussion, I'm reffering `Image Overview Page` for both problem and its resolution. But this will be same for any resource overview page where `hz-magic-search-bar` in implemented.

Problem Description:
====================
Currently filter on `Images Overview Page` can't have a custom filter. We need a way to filter by our custom category(a subset of any category or combination of two or more filters).

Moreover rather than clicking magic filter bar and filtering each time after page load, we think the previous (non angular way) filter by button was a better UX in my view.

Essentially our requirement is to list a subset of public images when loading `Images Overview Page` by default and we really don't want to click on search bar and do filter each time page loads.

So in my view problem can be broken into two parts:

#1. Need a custom filter button(or buttons) which does filter on custom category along with regular magic filter bar. A button filter will make it easier to filter everytime instead of clicking filter bar and selecting multilple filter conditions for each page load.

#2. A way to have default filters loaded on page load. Assuming I click on Images link, my expectation is to have a list of images( a sub set of public images).

#3. A way for admins to define these filters in their horizon installation.

Resolution:
===========
#1. A dropdown button before our existing magic search bar as button group
    * We can show a dropdown of buttons before magic search bar in `hz-magic-search-bar` directive implementation. This dropdown will contain custom filters as buttons and solves problem #1.
    * This dropdown button will be enabled by a flag in settings. This will ensure default behaviour of magic search is maintained.
#2. Not sure how to do it. Need your suggestions:
    * Regarding a default search filter applied on page load, I'm not sure of best approach. We can implement this by having one of the dropdown buttons always clicked on page load. But not sure if that is feasible or is best approach.
    * Please suggest what could be done here.
#3. A json with app_name and filter_conditions per app
    * We can have a json with filter_conditions and name of button if we need to display a custom filters.
    * This json will be for each app. This way we can maintain it per app.

Expected Issues:
================
* This change in magic search may break any implementation of this in other resources. I need your view on this.
* Can't think of any issue we may face other than above right now. Will add any raised by you lovely folks here.

Please let me know your view on this. Also if this is not clear I can explain on comments what exactly I wanted to convey but we need this and once finalized on UX, I can work on this to ensure this lands upstream.