Redesign frontend.set_theme service form#157866
Conversation
|
Hey there @home-assistant/frontend, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
NoRi2909
left a comment
There was a problem hiding this comment.
Very welcome improvement, the current Ui is really misleading. Two small suggestions below.
Co-authored-by: Norbert Rittel <norbert@rittel.de>
balloob
left a comment
There was a problem hiding this comment.
I like this. Left some comments with improvements.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Changed to raise I don't think it can be checked in the schema as we don't have |
This comment was marked as outdated.
This comment was marked as outdated.
|
I really like the change and I wonder if we can go futher by completley removing the dark theme (at least from the UI). This not directly related but I would personally prefer : System :
Browser :
I know that many users want to automate light and dark modes using automation instead of relying on computer/phone mode. |
|
If I was designing from scratch today it might make sense to do it that way, but that's a non-trivial breaking change if you can't use two different themes anymore? Maybe if you phase it in with a deprecation period it's ok. |
|
I think we could have a system-default light/dark mode, Actually do we currently not even respect the user configured preference for the loading screen, we just use the OS default? Maybe that's a non-issue then. |
MartinHjelmare
left a comment
There was a problem hiding this comment.
The frontend team should approve this PR before we merge.
We can get hass nowadays in custom validator functions used in the validation schema. Example: core/homeassistant/components/cloud/tts.py Lines 239 to 257 in e4aadd6 core/homeassistant/components/cloud/tts.py Line 279 in e4aadd6 |
|
Marking as draft for now. @wendevlin do you want @karwosts to keep this PR open for now, and/or get involved in some other way? Will you come back with more feedback here or should we close here now and make a new PR when the designs and the project are ready for that? |
Thank you, I think we can close it for now. I ping @matthiasdebaat who will work on the designs, please keep @karwosts in the loop |
|
I'm reopening by request from @matthiasdebaat. |
|
Thanks for reopening @MartinHjelmare and thanks @karwosts for this PR. When we talked about this PR last week, we came up with a long term solution that needs a bigger design concept. In summary it is aligning the profile page and services, with light/dark modes and an override for specific dark mode. This PR is a great intermediate solution as it already makes things better. I have a couple of suggestions:
Other text changes:
@karwosts what do you think? Feel free to suggest changes. |
I'm not too sure about this. Prior this PR you can update light, or update dark. And whatever one you don't update is unchanged. Now you suggest you should no longer be able to update dark without also updating light. But you can update light without updating dark? If you do that is dark supposed maintain its existing setting, or reset to unchanged? My code currently keeps the previous setting but I'm not sure if that's what you want. So I think it make sense to do either:
Or if its too confusing we can just wait for your redesign. |
|
I’m okay with keeping the checkbox. With a few small text changes, I think we can make it clearer what this service does. For example, by calling the dark theme selector an |
|
Updated the strings to your proposal. I am a little unsure that you asked to remove reference to "dark-mode client", as I wanted to emphasize that it's the client that sets the mode, not the service; but I'm fine with your proposal as well if you think that's unnecessary. |
|
There's a change request above. |
I received the desired strings directly from the UX lead, so any further changes should be deferred to reviewers, it's not for me to decide. |
|
Resolved the request |
Proposed change
The current service schema for

frontend.set_themeI think is not very intuitive, and I think it's misleading to a lot of users.I believe when users see the radio buttons for light/dark, they intuitively think that calling this service can somehow change their UI to dark or light mode, and they get confused when calling this service seems to have no effect, e.g. because their client is set to light mode, and they keep changing the dark mode theme which doesn't affect them. Which I don't really blame them because the descriptions on this screen doesn't really explain what is happening.
I think it would be much more intuitive here if we just show two separate theme selectors (and clearly describe their use):
Then I think it's much clearer to understand that this service does not influence the light/dark setting of a client.
The old schema will still work the same, this just adds a new schema that can set one or both modes in a single call.
Will update docs on approval.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: