instantsearch icon indicating copy to clipboard operation
instantsearch copied to clipboard

CurrentRefinements with HierarchicalMenu only clear one level at the time

Open samouss opened this issue 7 years ago • 5 comments

Is your feature request related to a problem? Please describe 🙏

The current implementation of CurrentRefinements with a HierarchicalMenu force the user to clear the full refinement (see example).

Describe the solution you'd like 🤔

We could consider to split the current refinement to let the user clear each part of the menu rather than remove the full refinement at once. To support this we have to split the current refinement and construct the correct value for each level (the parent level removes his children).

Describe alternatives you've considered ✨

Note that this is currently possible to implement this behaviour in user land with either the connectCurrentRefinement connector or even a breadcrumb.

Additional context

https://github.com/algolia/instantsearch.js/issues/2016#issuecomment-447291247

samouss avatar Dec 14 '18 12:12 samouss

I would very much like to see this bug resolved, since we consider this feature a major showstopper for us migrating from searchkit to algolia.

When choosing a second level in the hierachicalMenu, the chip for the currentRefinement changes in a mini-breadcrumb (?), that can only cancel the parent.

This is weird, unwanted UX.

e.g.

"Auto's > Volkswagen" removes the hierarchicalMenu refinement completely. One would only want to remove "Volkswagen", changing the hierarchicalMenu back to "Auto's".

desired UX:

"Auto's x" , "Volkswagen x" or even "Volkswagen x"

regards, Marco

MarcoTroost avatar Dec 31 '18 08:12 MarcoTroost

Is it an option for you to in the mean time use excludedAttributes to not show the hierarchical menu in the current refinements; and then instead use a breadcrumb for that menu? That should behave as you described

Haroenv avatar Jan 03 '19 09:01 Haroenv

Good morning Haroen,

Thanks for the suggestion. Perhaps we will do exactly this. Our users are nevertheless accustomed to our application behaving a certain way, including canceling the hierarchical filters one by one. Chanching this behaviour could be interpreted as a step backwards.

Algolia provides lots of ways to change the UI (which i love as developer), but the UX could be improved a lot imho.

When using the rangeInput in combination with currentRefinements for example, one would want to combine "from - to" in a single chip instead of two separate ones.

e.g. "from - to x" instead of "from x" and "to x"

kind regards, Marco

MarcoTroost avatar Jan 03 '19 09:01 MarcoTroost

@MarcoTroost that is another issue we are aware of and are planning to fix (I made an issue now, but it was on an internal backlog already: #3388)

Haroenv avatar Jan 03 '19 10:01 Haroenv

Thanks, looking forward to the new release!

MarcoTroost avatar Jan 03 '19 10:01 MarcoTroost