Instantsearch.js: showParentLevel for hierarchicalMenu doesn't do anything.

Created on 19 Oct 2017  路  8Comments  路  Source: algolia/instantsearch.js

What is the showParentLevel property for the hierarchicalMenu widget supposed to do?

I do not see any visual difference between true, or false.

Also why is the property a string when its settings are true/false?

Needs Investigation

Most helpful comment

@bobylito ahh I see! Thank you, that visual helps. I didn't have a data set with multiple levels to see its effect.

All 8 comments

Where do you see it documented as a string? All references seem to be boolean to me 馃

EDIT: found it

Cool, but on another note, what exactly does showParentLevel do?

@Giovanni-Mattucci It's very subtle to use actually. Even I had to test it :)

When set to true, it displays the siblings of the selected values. Also it doesn't change the behavior of the root level. Here is an example:

showParentLevel=true:
screen shot 2017-10-20 at 14 13 27

showParentLevel=false:
screen shot 2017-10-20 at 14 13 35

@bobylito ahh I see! Thank you, that visual helps. I didn't have a data set with multiple levels to see its effect.

I tried to give a better description of the behaviour of this parameter here. Can you tell me @Giovanni-Mattucci if it's clearer? Or maybe suggest something that could better help understand it?

@bobylito that is a bit more clear, but change "levels" to "level" since you can't select more than one parent hierarchical facet:
Show the siblings of the selected parent level of the current refined value. This does not impact the root level. :)

In documentation if you could visually illustrate it with some text, that would be good too:

  • Parent lvl0

    • lvl 1

    • lvl 2

    • lvl 2

    • lvl 2

    • lvl 1

    • lvl 1

  • Parent lvl0
  • Parent lvl0

vs.

  • Parent lvl 0

    • lvl 1

    • lvl 2

  • Parent lvl 0
  • Parent lvl 0

Not sure how best to illustrate, but I think your description is an improvement.

I like your schema. I will add it to the content of the doc, if you don't mind :)

Of course I don't mind haha :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeke picture zeke  路  3Comments

vvo picture vvo  路  4Comments

egyprotech picture egyprotech  路  3Comments

bobylito picture bobylito  路  3Comments

anthonyBertrant picture anthonyBertrant  路  3Comments