Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Tabbed Card forces following card beneath it #58

Open
baal000 opened this issue Dec 21, 2022 · 2 comments
Open

Bug: Tabbed Card forces following card beneath it #58

baal000 opened this issue Dec 21, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@baal000
Copy link

baal000 commented Dec 21, 2022

If you have multiple Cards on your Dashboard the Card that comes after the tabbed card is forced to stay below the tabbed card even if the window size would allow them to be rendered next to each other. See attachment_1
If you change the order they get rendered as you would expect it. See attachment_2

attachment_1
attachment_2

@kinghat
Copy link
Owner

kinghat commented Dec 21, 2022

this is likely due to HA assigning a default value of 1(50px) height to cards that dont set it themselves: https://developers.home-assistant.io/docs/frontend/custom-ui/custom-card/#api

Your card can define a getCardSize method that returns the size of your card as a number or a promise that will resolve to a number. A height of 1 is equivalent to 50 pixels. This will help Home Assistant distribute the cards evenly over the columns. A card size of 1 will be assumed if the method is not defined.

you can test this by adding a bunch of Tabbed Cards and they will eventually distribute themselves across the columns. i already have plans to implement this in the discussions -> feature requests: #26

@kinghat kinghat self-assigned this Dec 21, 2022
@kinghat kinghat added the bug Something isn't working label Dec 21, 2022
@ildar170975
Copy link

This frontend PR could be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants