-
Notifications
You must be signed in to change notification settings - Fork 95
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(menu): added display hidden to :not(.pf-m-current-path) .pf-c-menu #4980
Conversation
Preview: https://patternfly-pr-4980.surge.sh A11y report: https://patternfly-pr-4980-a11y.surge.sh |
f284f54
to
cfe2594
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL about this https://codepen.io/mcoker/pen/BarWpjy! I didn't know that was possible.
Traditionally we've required both display: none
and visibility: hidden
on an element to hide it across all the things we cared about - this will remove visibility
from the hidden/visible classes on list items if users are hiding/showing them for other reasons. Is that OK?
Does display: none
on the nested/hidden menus not work? Changing it in the react component like Eric mentioned seems to work - the parent menu height is still computed correctly.
@mcoker after some more testing, the issue appears to be with |
@mcoker @thatblindgeye There's also an issue with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on both the React menu drilldown and nav drilldown examples and it looks to work great! 🎉 I did initially notice at first on the nav drilldown when trying to apply the styles to the appropriate selector that the second level menu (after clicking the "Item 1" item) wasn't displaying, but after trying again I wasn't able to replicate the issue.
🎉 This PR is included in version 4.204.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
closes #4870
After testing, the removal of
pf-m-hidden
andpf-m-visible
modifiers has no affect on thedrilldown
variant for.pf-c-menu__list-item
. Neither class is present in the DOM or used in any of the interaction states. We need to retain the class to prevent a breaking change, but the mixin isn't necessary to use.