-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add open-state markers for nested popover parents #2967
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: next
Are you sure you want to change the base?
Conversation
| protected override showNestedItems(item: PopoverItem): void { | ||
| if (this.nestedPopover !== null && this.nestedPopover !== undefined) { | ||
| return; | ||
| if (this.nestedPopoverTriggerItem === item) { |
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.
please, add a jsdoc describing this statement
| this.nestedPopover.show(); | ||
| this.flipper?.deactivate(); | ||
|
|
||
| this.clearOpenedState(); |
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 it is called twice in this context?
| if (triggerEl) { | ||
| triggerEl.dataset.itemOpened = 'true'; | ||
| triggerEl.setAttribute('aria-expanded', 'true'); | ||
| } |
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.
jsdoc is required here
| } | ||
|
|
||
| /** | ||
| * Clears open-state markers from all popover items |
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.
JSDoc repeats function name. Please, describe why we need this method instead.
UX improvement here! 😅
This lets parent tune buttons retain their hover/tint while a child menu is open and clears it when the submenu closes or another submenu opens.
data-item-opened/aria-expandedwhen nested popovers open/close