-
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
Use dark brand logos for update entities in dark mode #22448
base: dev
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.
Should we listen for prefers-color-scheme to update the image when the system color mode change?
const mql = matchMedia("(prefers-color-scheme: dark)");
A bit of an alternative solution, using a regex to get the BrandsOptions from a given URL, so it can be modified and passed into brandsUrl again:
I'm not against the code you propose, but we're depending much more to fix this if they change the entity_picture url using the string indexes. |
Should we even provide an entity picture from core? Why don't we just create a brand image on the fly for update entities when there is no entity picture? |
If I recall correctly, update entities don't have the brand or domain set anywhere they are providing an update for. The domain is part of the URL and can be parsed from the URL only last time I looked into this. |
We should be able to get it from the entity registry, or fetch the entity sources |
Proposed change
Load dark brand images for update entities in dark mode.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: