Skip to content
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

ClrVerticalNavGroup caret should not be visible without children #396

Closed
15937823 opened this issue Nov 21, 2022 · 8 comments
Closed

ClrVerticalNavGroup caret should not be visible without children #396

15937823 opened this issue Nov 21, 2022 · 8 comments

Comments

@15937823
Copy link

It is recommended to add controllable down arrow (left arrow) to clr vertical nav group component.

For example:
<cds-icon
*ngIf="hasChildren"
shape="angle"
class="nav-group-trigger-icon"
[attr.direction]="expanded ? 'down' : 'right'"
[attr.title]="expanded ? commonStrings.keys.collapse : commonStrings.keys.expand"
>

@Jinnie
Copy link
Contributor

Jinnie commented Nov 21, 2022

I do not understand this request.
The groups in vertical nav do have associated caret icons.
Please provide more detailed information.

@15937823
Copy link
Author

I dynamically load this navigation data, but when there is no sub navigation under the first level navigation, this icon will still be displayed. It doesn't make sense.

for example:

image

There is no data under Home, but the icon is still displayed

@Jinnie Jinnie changed the title ClrVerticalNavGroup component enhancements ClrVerticalNavGroup caret should not be visible without children Nov 21, 2022
@Jinnie
Copy link
Contributor

Jinnie commented Nov 21, 2022

Thanks, makes sense now. I updated the title.
We will need comment form UX if we can work on this, or there is a usability reason to keep the caret even without children. Otherwise it might be hard to distinguish between group node and actionable node.

cc: @Partick @colinreedmiller

@kevinbuhmann
Copy link
Member

You shouldn't have a vertical nav group with zero children. I think this is simply incorrect usage of the vertical nav.

@15937823
Copy link
Author

You shouldn't have a vertical nav group with zero children. I think this is simply incorrect usage of the vertical nav.

No, the menu without children is normal. The menu data source API filters permissions.

@kevinbuhmann
Copy link
Member

kevinbuhmann commented Nov 21, 2022

No, the menu without children is normal.

I'm saying the vertical nav is not designed to have groups with zero children. A nav group with no caret would look identical to a nav link, but it would not function like a nav link. This would be a bad UX.

Also, a nav group with zero children doesn't make sense. Clicking a nav group expands it, but if it has no children, nothing will happen. As I stated above, this is simply incorrect usage of the vertical nav.

The menu data source API filters permissions.

I think you should hide the nav group entirely if the user doesn't have permission for any of the children.

@kevinbuhmann
Copy link
Member

I am going to close this as resolved as explained above.

@github-actions
Copy link
Contributor

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants