You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on feedback from usability testing, we would like to implement an EUISideNav for which certain subtrees are always open. The user would not need to click to expand some levels of the tree. Currently this appears to be impossible without forcing item.isSelected = true, which feels like an abuse of semantics.
I have a proof-of-concept implementation which adds an isOpen property to the item objects passed to EUISideNav. When item.isOpen = true, it would trump item.isSelected and force that level of the navigation to be open. Other selection functionality should be preserved. This approach would allow for opening the entire menu by default, or only specific subtrees (our use case).
item.isOpen = undefined // Defer to item.isSelected (default).
item.isOpen = true // Force this level of the menu to be open.
item.isOpen = false // Force this level of the menu to be closed.
I could also see .isOpen being renamed to .forceOpen.
@cjcenizal, @snide: @andrew-moldovan and I are interested in your thoughts on this proposal. If this sounds good, I'll package everything up in a PR.
The text was updated successfully, but these errors were encountered:
As long as its an optional prop that is set off by default it sounds ok to me. Generally @cjcenizal has been prefixing such things with initial... initialIsOpen
Interesting point re: initial. If we went with that prefix, I would expect the menu to only be open initially, that is, until the user interacts with it. I'll have to take another look at the code to see if it's worth implementing that way. I could also imagine a future wherein we really would want some menus to be always open, even post-interaction.
@arkwright Your idea sounds great, and isOpen sounds like the right name for that property. I agree with you that if we prefixed it with initial, we'd expect it to be open at first and then the user would be able to interact with it.
Based on feedback from usability testing, we would like to implement an
EUISideNav
for which certain subtrees are always open. The user would not need to click to expand some levels of the tree. Currently this appears to be impossible without forcingitem.isSelected = true
, which feels like an abuse of semantics.I have a proof-of-concept implementation which adds an
isOpen
property to theitem
objects passed toEUISideNav
. Whenitem.isOpen = true
, it would trumpitem.isSelected
and force that level of the navigation to be open. Other selection functionality should be preserved. This approach would allow for opening the entire menu by default, or only specific subtrees (our use case).I could also see
.isOpen
being renamed to.forceOpen
.@cjcenizal, @snide: @andrew-moldovan and I are interested in your thoughts on this proposal. If this sounds good, I'll package everything up in a PR.
The text was updated successfully, but these errors were encountered: