We got subViews in 2022.10. What about subDashboards?

Earlier the structure of Lovelace was:
– several dashboards (accessed from a sidebar);
– each dashboard has 1…n views (accessed from a topbar);
– we may navigate between views.

image

Since 2022.10 we got subViews:
– cannot be accessed from a topbar;
– may be accessed from another views;
– have a “Back” button (which may be customized).

image

What about subDashboards?
– cannot be accessed from a sidebar;
– may be accessed from another view;
– have a personal topbar with personal views;
– have a “Back” button.

Isn’t a sub dashboard just a dashboard you hide from the left side nav? What’s the difference?

4 Likes

OMG, you are right.
Never used the “show_in_sidebar” option, completely forgot about it…

If it makes you feel any better I really enjoyed your flow charts! :grinning:

2 Likes

Thank you ))) (Mind Manager, spent several minutes to draw them)
Btw, there is one thing which I dislike in the current implementation of “dashboards with show_in_sidebar=false”.
There is no BACK button.
Yes, in a browser we may press the “back” button, but what about Companion App?
No, ultimately I need a big “Back” button…

Screenshot_20221006-222527

So if you browsed to different views on the sub-dashboard, would the back button cycle you back through those views like a browser back button would, or would it take you back to the last open view of the main dashboard?

Taking you back to that last open view of the main dashboard is the only advantage I can think of with a dedicated back button because you can also always use the hamburger menu top right to navigate back to your main dashboard home view.

And a dedicated back button going to take up quite a bit room, especially on mobile, because you would now have the header icons in addition to the back button row (no way it could be squeezed on the header row on mobile, already too crowded if multiple views on a dashboard).

Not saying a back button wouldn’t be convenient or maybe have it’s uses, but I think it would be a stretch to get it implemented and there are viable options already available if you need to do something now.

I thought way too much about this way to much…

The picture you attached is related to Android, but what about iOS? It does not have a common “back” button.

The browser’s “back” button does not care about a logical structure of Lovelace, it only opens links backwards.
The new subView has a “back” button which moves you back to the view from which you navigated to this subView - and this is a finish, there is no logical “back” after that as well as a dedicated button.
Regarding my fictional subDashboard - it has this “back” button too (like a subView) - just to move back to the “calling” view.
Agree about occupying a precious room on a mobile UI.
Well, this is WTH - an exchange of ideas (even some crazy ones).

Hmmm so done this… not as simple as it looks. The problem is when there is no ‘back’ and the last open page you had is a subview (certainly in the companion app) you get stuck in the UI with no escape.

I created a dashboard with several subviews in it and hid it from the sidebar (call it dashboard B), then another ‘main’ dashboard (call it A) with links to various subviews in dashboard B. All appears fine and the ‘back’ works as expected.

However if you have a subview active in the companion app from dashboard B, and close the app (not just background it), when it reopens there is no longer a valid ‘back’ link. Putting a default non-subview on dashboard B helps somewhat (in that it provides you with a default escape from the no-back loop) but not ideal as that’s where the companion app tries to reload to.

You can also repeat the problem if you switch from internal to external (or vice versa) connections to HA by coming on and off wifi on your mobile while the companion app is no longer active.

I’m also not convinced it’s because of the ‘hidden’ nature of the dashboard - this feels like just a generic problem with the concept of having a (very useful) ‘back’ button on a view - there are going to be situations when there quite simply is no ‘back’.

The only sensible way of solving that is to have a ‘get me home’ link somewhere on every sub-view (or perhaps a hold-action on the back button to reload the default URL given the current URL context built into the companion app rendering of the ‘back’ button.

Fix back button on subview by bramkragten · Pull Request #14251 · home-assistant/frontend · GitHub seems to be dealing with this!