-
Couldn't load subscription status.
- Fork 478
feat(DotNavItem): Change navigation item to only open/close in the last third #33644
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
base: main
Are you sure you want to change the base?
feat(DotNavItem): Change navigation item to only open/close in the last third #33644
Conversation
…nd update event emissio
| align-items: center; | ||
| cursor: pointer; | ||
| display: flex; | ||
| padding: 14px 0 13px 25px; |
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.
Make use of the spacing variables that you can find here
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.
Okay, now I'm using the spacing variables, but I'm using the closest values since they are not exact. It's just a 1px or 2px difference, but I'm not sure if we are going to have an issue with the design.
| cursor: pointer; | ||
| display: flex; | ||
| justify-content: center; | ||
| padding: 14px 22px 13px 0; |
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.
Same here, use the ones that are more close to the value
Description
This PR introduces an enhanced click behavior for
nav-itemsto provide more control over group expansion and navigation.The
dot-nav-itemcomponent has been refactored to be split into two distinct clickable areas:Changes Made
dot-nav-item.component.htmldata-testidattributes.dot-nav-item.component.scssdot-nav-item.component.tstoggleHandlermethod to manage clicks on the new toggle area.menuClickemitter is reused. When the toggle area is clicked, it now emitsmenuClickwith an optionaltoggleOnly: trueflag.menuClickwithout thetoggleOnlyflag, preserving the original functionality.stopPropagation()is called on toggle clicks to prevent the event from bubbling up.Tests
dot-nav-item.component.spec.tsmenuClickemits withtoggleOnly: truewhen the toggle area is clicked.menuClickemits without thetoggleOnlyflag when the main area is clicked.event.stopPropagation()is correctly called on toggle area clicks.Demo
Please see the video below demonstrating the new split-click behavior.
PR23381.mp4
This PR fixes #32017