-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add count
prop to OuiTreeView
#934
Comments
Great design! Good re-use, showing the flexibility of facet as a base-component for other compositions. A lot of my intuition on this is based on the absense of a left/down chevron, which the industry usually uses to show collapsed/shown accordion (and in fact is on Accordion). I am +1 on this absense, and I think the children-count indication is excellent and I feel is the thing that allows the exclusion of the chevron. Kind of traded-up the chevron for an equally appropriate indicator that gives more information. Counter-intuitively, I would choose "selected" state for Collapsed tree segements. In my mind this would bring attention to things the user is not seeing. I feel like an expanded tree segment is highlight-enough in its own right. |
@pjfitzgibbons I may have caused some confusion by referencing facet styling here. OuiTreeView already exists and the expand / collapse icons can be set by the builder - they can be chevrons or other icons (like folders) : https://oui.opensearch.org/1.2/#/navigation/tree-view Since count would be optional in OuiTreeNav, we would still want to use expand/collapse indicators. Builders may also choose to force expand the tree as well. For clarity - this component doesn't contain facet - for the sake of speed/ not having to red-line a design or cause an inconsistency, I was pointing to the design of count on OuiFacet and OuiFilterGroup for the builder to reference. Can you take a look at the OUI Docs for Tree view and see if the way icons for expand/collapse give you any concerns or questions ? |
OK. looking. You references "OuiTreeNav".. are you considering adding a new/fork component here? I don't understand the difference vs OuiTreeView. |
@pjfitzgibbons No, not a fork or a new component, this is just an additional prop within the existing component. Right now there is no count in tree view today. Here is what tree view looks like currently: |
I can take this issue. Basically a count prop that is displayed next to the labels of the tree view that mirrors OuiFacet's count prop? |
Signed-off-by: keskami <[email protected]>
Count
prop should reflect the number ofOuiTreeNode
children, and should be optional to includecount
styling fromOuiFacet
andOuiFilterGroup
to build styling while retaining hover styling ofOuiTreeView
- spacing between text & count =$ouiSizeS
Examples:
- Default:
- Disabled:
Discuss:
What do we think about using the styling of
selected
that is present inOuiFacet
andOuiFilterGroup
for theisExpanded
state ofOuiTreeGroup
? Do we think that the expansion itself is visual communication or not? IMO, the expansion itself is sufficient, but for the sake of complete exploration here are examples of count changing color when a user is interacting with an element that contains a count:The text was updated successfully, but these errors were encountered: