-
Notifications
You must be signed in to change notification settings - Fork 159
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(Masthead): have nav item render with selected styles in mobile nav #4259
fix(Masthead): have nav item render with selected styles in mobile nav #4259
Conversation
Deploy preview created for package Built with commit: 463f2833d19669ce9606196d025dc3d4a9baa6b0 |
Deploy preview created for package Built with commit: 463f2833d19669ce9606196d025dc3d4a9baa6b0 |
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.
LGTM :) thanks @annawen1!
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.
LGTM!
carbon-design-system#4259) ### Related Ticket(s) menu item doesn't show active state in hamburg menu in masthead carbon-design-system#4076 ### Description The `LeftNav` menu item wasn't checking with the proper prop, so it wasn't detecting whether to render the nav item as selected in mobile. FIXED: <img width="652" alt="Screen Shot 2020-10-19 at 4 26 13 PM" src="https://user-images.githubusercontent.com/54281166/96508017-fcd87200-1227-11eb-98d1-3b56c314b5a1.png"> ### Changelog **New** - add `titleEnglish` field to the `Nulla quis sem at nibh elementum imperdiet` custom nav item to allow for additional testing **Changed** - check for `rest.selectedMenuItem` in the `LeftNav` and render `#{$prefix}--masthead__l0-nav--selected-item` classname - this is specific for L0 nav items that don't have a menu <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "package: styles": Carbon Expressive --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) -->
Related Ticket(s)
menu item doesn't show active state in hamburg menu in masthead #4076
Description
The
LeftNav
menu item wasn't checking with the proper prop, so it wasn't detecting whether to render the nav item as selected in mobile.FIXED:
Changelog
New
titleEnglish
field to theNulla quis sem at nibh elementum imperdiet
custom nav item to allow for additional testingChanged
rest.selectedMenuItem
in theLeftNav
and render#{$prefix}--masthead__l0-nav--selected-item
classname - this is specific for L0 nav items that don't have a menu