rianadon/timer-bar-card

Display of Bar broken with layout: hide_name

MrFr33man123 opened this issue · 3 comments

Describe the bug
The bar does not fill the width like it did before. the bar is just a few pixels wide.
Before the bar spanned from the icon to the timer.

Your card configuration

type: custom:timer-bar-card
entity: timer.co2_buro
guess_mode: true
layout: hide_name
debug: true
...

Debug information
Please add debug: true to your configuration and either take a screenshot or paste the output here!
Screenshot_20230627_061847_io homeassistant companion android
Screenshot_20230627_061441_io homeassistant companion android

Edit: seems like there is a class .info and margin with flex: 1 1 30%; margin-right: 16px; margin-left: 8px;

if i remove the whole info class it looks like before.

Huh I'm not sure why that's happening. I'm viewing the card on 2023.6.3 and I don't notice any difference:

image

The info class is from the card, but if you remove the flex style the bar corrects itself?

Edit: layout: hide_name must be applied to see the issue. WIth name shown the bar gets bigger as normal.

In your Screenshot its clear that between Test and the bar there is a space. That space is extended when layout: hide_name is applyed also when the width of the card gets shrunk it gets to the point of not even beeing displayed at all.

And yes I removed the class .info in developer mode of the browser to check why it is happening.
image
This is full width.

image
This is shrunk => it even dissapears

image
This is small with the .info class removed.

image
Removed that info in the div before the bar.

Oh I see what happened now. 28e6795 should have only added that div when the card when the timer is idle, but instead it always adds that div.

Thanks for reminding me again this is only with hide_name. I didn't catch that the first time.