-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update sidebar #16017
Update sidebar #16017
Conversation
With the list element removed, we now no longer have keyboard navigation, like typeahead and simple arrow handling. Also is it now missing a lot of a11y feats. |
re: a11y, after checking on my machine:
|
Maybe better to just wait for the @material/web drawer component? |
Press a letter when focus is on the old sidebar list, it will focus the item starting with the letter you pressed. |
@LasseRosenow there is a nav drawer component but that just wraps whatever content you want to put inside of it - could be they'll add more later as it's marked as wip |
Basic a11y features for lists https://w3c.github.io/aria/#list |
Well I'm not sure how to move forward on this, as using paper-listbox would reintroduce the bugs like ctrl+clicking behavior. Should I make a custom implementation to handle those keys? |
You can use |
- fix currentpanel logic - disable native outline, indicate focus on active page - prevent focus on container - space works to activate an item - typing and up/down works to focus an item
I believe this PR should be ready for comment now. In my testing I didn't find any bugs, and everything from the ARIA listbox guidelines (if it was in there previously) is now working. |
Too bad this didn't got a review yet, I've had a go and tested your changes. I didn't look at the code yet. The sidebar is so much smoother by removing that paper-listbox. It feels like the dashboard also loads faster. |
i'll see if i can reproduce that |
static shadowRootOptions = { | ||
...LitElement.shadowRootOptions, | ||
delegatesFocus: 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.
This is the reason the ordering of dashboards no longer work. I'm not sure how to solve it though, unless it is accepted that focus can be on the container, which I assume this is the reason the code exists.
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.
Can't reproduce the issue with reordering dashboards
Can you send a screen recording and other relevant info
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.
So, I can reproduce this on both Microsoft Edge and Google Chrome latest version. On Mozilla Firefox it works good. I'll see if I can create a screen recording.
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 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.
Can't reproduce w/ Chromium 117.0.5938.132 or Chrome Mobile 118.0.5993.80
Does it work if you clear your localstorage by chance
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.
Too bad, removing localstorage doesn't solve it. It works if the shadowRootOptions are removed or delegatesFocus is set to false. Let's wait until somebody other reviews.
Major UI changes like these will have to be approved by our design department, CC @matthiasdebaat |
I see that there was a "needs design preview" label added. Assuming that refers to https://design.home-assistant.io/, I have some questions about how to implement one:
|
Hey, I'd just like to recap that with
If the code looks all good, this PR is ready to merge. |
Should be resolved on the latest commit |
@bramkragten can this get a review somehow or is there anything that still needs to be done before review? |
I don't like the text color and especially the icon color of the sidebar, is there a reason these are now so dark? |
In the dark theme or light theme? Thing is that M3 calls for
Yup, this is in compliance with Material 3. The title should be
The previous implementation didn't have ripples, and I'm not exactly sure which ripples to use. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Current or can be closed? |
Let me fix the conflicts (yet again..) |
Actually there have been too many changes for me to want to bother with fixing this yet again. I'm just sad that this never got a chance to get merged. |
Proposed change
Updates the sidebar to
Type of change
Example configuration
NA
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: