thomasloven / lovelace-state-switch

🔹Dynamically replace lovelace cards depending on occasion
MIT License
382 stars 27 forks source link

Using significantly more column space (overlap) when used with history-graph card (affecting zoom factor on mobiles) #52

Closed bcutter closed 2 years ago

bcutter commented 3 years ago

In addition to https://github.com/thomasloven/lovelace-state-switch/issues/41 the rare types of history-graph cards working with state-switch (the ones with a X and Y axis) result in the history cards using more space than allowed in their column.

I discovered this when using the mobile (smaller screen).

Without state-switch: grafik

With state-switch applied to history-graph card: grafik

Please notice the automatically changed zoom factor. So the hole view is malformed on the mobile screen.

On a second view the zoom factor remains, but the graphes are cut (overlapping screen) instead.

state-switch really has some significant issues with history-graph card!

mag1024 commented 3 years ago

@bcutter, do you have transitions enabled? If so, you might see if disabling them cures the problem. I noticed similar behavior on the desktop, and in my case it was caused by the 'display: grid' that transitions insert.

bcutter commented 3 years ago

@bcutter, do you have transitions enabled? If so, you might see if disabling them cures the problem. I noticed similar behavior on the desktop, and in my case it was caused by the 'display: grid' that transitions insert.

You´re right, this issue only appears when having a transition enabled. BUT: As a workaround for history-graph cards showing up at all, it´s recommended to use transitions. See https://github.com/thomasloven/lovelace-state-switch/issues/41

So hard to decide... as described here https://github.com/thomasloven/lovelace-state-switch/issues/41#issuecomment-841715875 you can´t have em all, like "a history-graph of type 'laying bars' without any transition". Thomas needs to have a look into this as something´s just really mixed up here.

bcutter commented 2 years ago

I tested latest v1.9.0 and unfortunately can not to confirm this version fixed this issue, instead it´s the other way around:

With v8 it was working meanwhile (âš ), at least the graph itself was shown correctly (while the text still exceeded its right border): grafik

But with v1.9.0 now it´s looking buggy (like "zoomed in") like before: grafik

So with v1.9.0 the issue is basically being reintroduced. That´s strange! Sorry to report but according to my tests this issue is not closed yet. Not sure what "fixed" it before, maybe the overall update of the graphs during one of the HA Core updates since June

thomasloven commented 2 years ago

It's possible that 1.9.1 fixes this.

bcutter commented 2 years ago

It's possible that 1.9.1 fixes this.

Unfortunately no, it doesn´t. You haven´t found the root cause for this yet :-(

bcutter commented 2 years ago

In addition: the issue also exists for other card types.

Here I have some mini graph cards in vertical stack cards as well as entities card, all put in state switch card which is in a vertical stack card.

image

thomasloven commented 2 years ago

Please try release 1.9.3

bcutter commented 2 years ago

v1.9.3 rocks (so do you)! Fixed everything I mentioned earlier in this issue. Thank you.