-
Notifications
You must be signed in to change notification settings - Fork 87
refactor: only show submenu indicator if there are child items #10472
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
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.
This looks kinda out of place.. should this logic also apply on the left side (check mark) if none of the menu entries are checkable?
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.
In theory yes, but that's a bit more complicated. There is an existing issue: #613
In short, the web component doesn't have a way to detect when the item is checkable, so we assume they are by default. This is also related to some missing a11y semantics - see #165 (comment)
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.
That was also the idea. But currently it’s not possible to know with CSS if an item is checkable.
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.
In the meantime, I think we should make it easy to hide that empty space in a menu if the developer knows none of the items are checkable. I added a class name to each individual item in StarPass in such cases, but I think it would be easier if it could be applied on the whole menu. But there’s no API for that, is there?
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 is no API in the web component indeed. Let's maybe discuss it in #613.
|
Now I’m wondering, why do we even add that pseudo element by default on items that don't have sub-menu? Couldn't we just not do that, and only add it to items that have |
|
@jouni Thanks, it does make sense. Updated base styles and reverted addition of these slot styles. |
|



Description
Part of #10417
Type of change