thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
561 stars 37 forks source link

Section divider width #195

Closed uvjim closed 2 years ago

uvjim commented 2 years ago

My Home Assistant version: 2021.11.5

Fold-entity-row version (FROM BROWSER CONSOLE): 20.0.12

What I am doing: Creating any fold-entity-row with a section heading results in a shorter than it should be divider line. I have restarted HASS, forced a cache reload and tried different browsers (screenshot is from FF but also tried in Edge).

What I expected to happen: To have a line that spanned the width of the card.

What happened instead: I get a shorter than expected divider line.

blue arrows show the edges of the section divider line in the card. green arrows show the blank edges of the shorter section divider from fold-entity-row

image

Minimal steps to reproduce:

A slightly modified version of an example in the README.

type: entities
entities:
  - type: custom:auto-entities
    filter:
      include:
        - domain: device_tracker
    card:
      type: custom:fold-entity-row
      head:
        type: section
        label: Automatically populated
  - type: section

Error messages from the browser console: No errors relating to fold-entity-row


By putting an X in the boxes ([X]) below, I indicate that I:

weelad commented 2 years ago

I'm seeing this too.

ildar170975 commented 2 years ago

A possible workaround:

  - type: entities
    title: fold-entity-row
    entities:
      - entity: sun.sun
      - type: custom:fold-entity-row
        head:
          type: section
          label: Section
        padding: 5
        open: true
        entities:
          - sun.sun
          - sun.sun
        card_mod:
          style: |
            div#head hui-section-row {
              overflow: visible !important;
            }

изображение

ildar170975 commented 2 years ago

The problem is not observed on iOS app (iOS 15.x) HA 2021.12.6

uvjim commented 2 years ago

A quick change to the code to make it apply to all folds in the entities card...

type: entities
title: fold-entity-row
card_mod:
  style:
    '#states':
      fold-entity-row:
        $: | 
          div#head hui-section-row {
            overflow: visible !important;
          }
entities:
  - entity: sun.sun
  - type: custom:fold-entity-row
    head:
      type: section
      label: Section
    padding: 5
    open: true
    entities:
      - sun.sun
      - sun.sun
  - type: custom:fold-entity-row
    head:
      type: section
      label: Section 2
    padding: 5
    open: true
    entities:
      - sun.sun
      - sun.sun
  - type: section
    label: Section 3
  - entity: sun.sun

image

ildar170975 commented 2 years ago

Seems to be fixed in 2.0.15

uvjim commented 2 years ago

Confirmed. Seems to be resolved now.