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

fix: collapse sidenav menus when side nav is closed #16096

Merged

Conversation

riddhybansal
Copy link
Contributor

Closes #15900

Submenus should close when side nav closes

Changelog

Changed

  • Style changes

Testing / Reviewing

Go to storybook , Open Side Nav -> Open Submenu -> Close side nav , sub menu should collapse autromatically.

Copy link

netlify bot commented Mar 29, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit e12bcfb
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/660d7b4c242b2900094c3edf
😎 Deploy Preview https://deploy-preview-16096--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally display: none can't be used because it removes the element(s) from the accessibility tree and so it won't be read by screenreaders.

Instead of a style-related fix, would it make sense to modify the internal state of SideNavMenu to account for the change in the parent SideNav?

This bug was introduced #15349, my guess is the fix for this would be something similar to what was removed, but without reintroducing the bug it was fixing.

Copy link
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@tay1orjones tay1orjones added this pull request to the merge queue Apr 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 3, 2024
@andreancardona andreancardona added this pull request to the merge queue Apr 3, 2024
Merged via the queue into carbon-design-system:main with commit 0619707 Apr 3, 2024
20 checks passed
preetibansalui pushed a commit to tay1orjones/carbon that referenced this pull request Apr 24, 2024
…stem#16096)

* fix: collapse sidenav menus when side nav is closed

* fix: sidenav collapse issues

* Update packages/react/src/components/UIShell/SideNavMenu.tsx

* Update packages/react/src/components/UIShell/SideNavMenu.tsx

---------

Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: SideNavMenu remains expanded, when Rail SideNav collapses
4 participants