frontend
frontend copied to clipboard
move default dashboard setting to user settings
Proposed change
Following the sidebar settings that are moved to the user settings, also move the setting for default dashboard to user settings.
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [X] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Example configuration
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue or discussion:
- Link to documentation pull request:
Checklist
- [ ] The code change is tested and works locally.
- [ ] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
Which version are you targetting this PR for? There will be many custom components including Browser Mod that will need updating. I believe this should also be marked as breaking as currently there will be users who will have different Dashboards set as default for different devices for the same user, which is entirely possible with the existing standard UI and storage in localStorage.
Which version are you targetting this PR for? There will be many custom components including Browser Mod that will need updating. I believe this should also be marked as breaking as currently there will be users who will have different Dashboards set as default for different devices for the same user, which is entirely possible with the existing standard UI and storage in localStorage.
We are targeting the june release, so it goes in the same release as the sidebar changes that will have the same change.
We are targeting the june release, so it goes in the same release as the sidebar changes that will have the same change.
So that is tomorrow (11th June?).
Yes
The PR has not been reviewed, nor has the beta discussion mentioned changes for defaultPanel, only Sidebar Settings, for which I have made allowances and have a beta of Browser Mod with required changes. However now I will need to speed through custom component changes based on a PR that is yet to be reviewed and so may change. I find this all a bit rushed and no chance to adjust custom components to work with the change. This should be delayed until a June point release.
@bramkragten I have looked at the PR and have some review points for consideration.
- frontend/set_user_data has "sidebar" as a value that can be set. After #25555 I could clear Sidebar settings by calling the api with
sidebar: {}. Now that defaultPanel is part of "sidebar" I have to decide what to do with defaulPanel when I just want to clear sidebar settings (or vice versa if dealing with defaultPanel). [The rationale here to provide Browser Mod users a way to clear user settings so to fallback to locaStorage which Browser Mod uses for per device/browser and global Sidebar settings.] - defaultPanel and sidebar are different elements. Sidebar does use defaultPanel information to show icons, but defaultPanel is not exclusive to Sidebar information. Having defaultPanel as part of the "sidebar" vale does not make real sense to me. They should be able to be managed independently as far as storing, clearing etc.
- Demo will need update like #25606
- I am still getting my head around how
<home-assistant>first deals with defaultPanel, then panel resolver does, which after this PR would be reading via frontend/get_user_data. I am not sure what the outcome is leavinggetStorageDefaultPanelUrlPathreading from local storage, but panel/sidebar reading from user data?
Thank you for your time to consider these reveiw points.
I kind of agree with your 2 point, and was thinking the same.
But your first point, sorry, we just really don't support this, and I would like to ask you not to mess with stuff like this, as it will likely break, and then users will blame us...
But your first point, sorry, we just really don't support this, and I would like to ask you not to mess with stuff like this, as it will likely break, and then users will blame us...
How else can a user clear their sidebar settings back to default? If there was a way for a user to do this then we can instruct them to use that way.
Why don't you follow common sense and transfer control of user access rights to interface elements to someone who should manage it, namely, the administrator. Currently it turns out to be some kind of strange self-limiting scheme that allows for the emergence of extremes that can harm both the system and the user himself. It is up to the administrator to assign the user the home dashboard, the sidebar content and presence, available tabs, system icons and idle timeout behavior regardless of the login device. And it is desirable to collect all this in one place.
When is this expected to be released? I was actually looking through the repo with the intention of contributing a PR since default dashboard reverting to the default is my nr 1 problem with HA, and even more so for my less technical SO. And I would assume it's an annoyance for a lot of people as there are some many threads regarding it. But now I see it is being worked on which is great!