-
Notifications
You must be signed in to change notification settings - Fork 273
fix(ui5-side-navigation): add parent item to submenu #11379
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?
Conversation
According to the interaction design clicking on the parent item in the Overflow menu should only open the sub-menu, but should not select the parent item. Clicking on the parent item in the sub-menu selects it and closes the menu - this is the only way to select the parent item in the overflow menu (the menu lacks two-click area functionality for the moment). This is the reason why we add again the parent item also in the sub-menu. JIRA: BGSOFUIRODOPI-3443
…SideNavOverflowRepertParent
@@ -58,6 +58,10 @@ | |||
height: 0.875rem; | |||
} | |||
|
|||
:host(.ui5-navigation-menu-item-root-parent)::part(content) { | |||
font-weight: bold; |
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.
Why add font-weight
? It is not mentioned in the VD
@@ -27,18 +27,34 @@ export default function SideNavigationTemplate(this: SideNavigation) { | |||
tooltip={item._tooltip} | |||
ref={this.captureRef.bind(item)} | |||
> | |||
{(item.children.length && !item.unselectable) ? |
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.
Better use item.items.length
@@ -27,18 +27,34 @@ export default function SideNavigationTemplate(this: SideNavigation) { | |||
tooltip={item._tooltip} | |||
ref={this.captureRef.bind(item)} | |||
> | |||
{(item.children.length && !item.unselectable) ? |
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.
Better replace ternary operator with &&
item.items.length > 0 && !item.unselectable && <NavigationMenuItem ...> ... </NavigationMenuItem>
According to the interaction design clicking on the parent item in the Overflow menu should only open the sub-menu, but should not select the parent item.
Clicking on the parent item in the sub-menu selects it and closes the menu - this is the only way to select the parent item in the overflow menu (the menu lacks two-click area functionality for the moment).
This is the reason why we add again the parent item also in the sub-menu.
JIRA: BGSOFUIRODOPI-3443