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

[Feature Request]: Expand all prop for the SideNavMenu #9604

Closed
1 task done
adamalston opened this issue Sep 4, 2021 · 5 comments
Closed
1 task done

[Feature Request]: Expand all prop for the SideNavMenu #9604

adamalston opened this issue Sep 4, 2021 · 5 comments
Labels
component: ui-shell package: react carbon-components-react proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: waiting for maintainer response 💬 type: enhancement 💡

Comments

@adamalston
Copy link
Contributor

Summary

Add an expand all (expandAll?) prop for the SideNavMenu to expand all of the menus in the SideNav.

Justification

A design document that my team was given has a button to toggle the expansion of all items in the SideNavMenu.

I can currently expand all menus in the SideNav using the following code but it is just a "hack" to show that it is possible:

<S.SideNavMenu
  ref={(el: HTMLButtonElement) => {
    el?.setAttribute('aria-expanded', 'true');
  }}
  ...
>

Having a set property to accomplish this task would be much better.

Desired UX and success metrics

A user would click a button located in the SideNav which would toggle the expansion of all menus.

Required functionality

No response

Specific timeline issues / requests

No response

Available extra resources

No response

Code of Conduct

@jnm2377 jnm2377 added the proposal: open This request has gone through triaging. We're determining whether we take this on or not. label Feb 2, 2022
@jnm2377
Copy link
Contributor

jnm2377 commented Mar 7, 2022

@adamalston thanks for opening this issue. We are thinking we don't really want to support this, but also want to understand your reasons behind wanting this. Could you explain why this is needed?

@adamalston
Copy link
Contributor Author

Essentially what the issue description says; we have a design doc with a button to expand all SideNavMenu items. I would like a streamlined way of invoking this functionality (via a prop) but if that's not an option, we can just use the hack I have in the description.

@jnm2377
Copy link
Contributor

jnm2377 commented Mar 21, 2022

@adamalston what I was trying to ask was why is this UX pattern useful or important to have? What problem is it solving? What research has been done for it? I think just having a design spec for it is not always a good enough reason, we have to consider the reasoning behind it. Can your design team provide more information? 🙂

@adamalston
Copy link
Contributor Author

Heard back from one of the designers working with my team:

We can skip it since carbon doesnt seem to support it. That design was based from carbon’s take on left nav, but if they don’t have future plans to do so, we can go ahead and skip it

Closing.

@scottagt
Copy link

scottagt commented Aug 5, 2023

I have to say, I just found myself in a similar situation to the original poster and needed to expand a sideNavMenu to notify the user of incoming chat messages in their list of chats and I was surprised to find there was no "expanded" property that could be used to control the open/close of the menu. I was further surprised that the original poster was asked to jump through hoops to justify their request. 🤷‍♂️ @adamalston Thank you very much for the hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ui-shell package: react carbon-components-react proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: waiting for maintainer response 💬 type: enhancement 💡
Projects
Archived in project
Archived in project
Development

No branches or pull requests

4 participants