home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.8k stars 2.6k forks source link

Sidebar size issue with a statistic graph card on a Sidebar view #20864

Open mbo18 opened 1 month ago

mbo18 commented 1 month ago

Checklist

Describe the issue you are experiencing

There is a bug with the sidebar view type : the sidebar on the left is really small compared to the energy dashboard when there is a statistic graph card in the view:

Capture d’écran 2024-05-24 à 14 52 24

Size is OK when in edit mode:

Capture d’écran 2024-05-24 à 15 26 00

Describe the behavior you expected

Size of the left bar/column should be the same size when there is a statistic graph card in the view or not

Steps to reproduce the issue

  1. Add a new view with View type set to "Sidebar"
  2. Add a gauge and move it to the left
  3. Add another card that is not a statistic graph card
  4. Save the view, the size of the left column with the gauge card is OK
  5. Edit the view, add a statistic graph card and save the view
  6. The size of the left column with the gauge card is NOK

What version of Home Assistant Core has the issue?

core-2024.5.4

What was the last working version of Home Assistant Core?

don't know

In which browser are you experiencing the issue with?

Firefox, Safari latest release

Which operating system are you using to run this browser?

macOS and Windows 11

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

ildar170975 commented 1 month ago

In my experience, a sidebar's width depends both on cards "on the left" & cards on the sidebar itself. Managed to set a fixed width with a card-mod theme , kind of

  hui-sidebar-view:
    $: |
      .container div#sidebar {
        min-width: .........;
        width: -webkit-fill-available;
      }