thomasloven / lovelace-fold-entity-row

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

global configuration settings #205

Open Mariusthvdb opened 2 years ago

Mariusthvdb commented 2 years ago

move out of issue, separate FR now:

btw, did you ever consider setting a global option on the fold? Or would you accept a FR to do so?

Use case, I use padding: 0 on each card, and would also use the no animation on each card. I card_mod the fold label to use

  - type: custom:fold-entity-row
    head:
      type: section
      label: Details
      card_mod:
        style: |
          .label {
            margin-left: 0px;
          }

to align , described in FR 203, so its getting a bigger config everywhere:

  - type: custom:fold-entity-row
    head:
      type: section
      label: Details
      card_mod:
        style: |
          .label {
            margin-left: 0px;
          }
    padding: 0
    no_animation: true

would there be any chance of setting that globally for all folds? the card_mod maybe get its own config option and be

  - type: custom:fold-entity-row
    head:
      type: section
      label: Details
    margin: 0
    padding: 0
    no_animation: true

and set those globally?

other option ofc would be by hacking the resource, as I did on the animation before. for me that would be ok, but it would require editing each release, and, of, it wouldn't be as flexible.

still if you'd point me to a spot in the resource where we can go from

Schermafbeelding 2022-01-28 om 14 04 00

to

Schermafbeelding 2022-01-28 om 14 05 06

that would be enormously appreciated.... for now I tried all options, even added a #label style, but that doesnt exist/work

please consider?

ildar170975 commented 2 years ago

I think it would be great to have a support of "templates" - like it was done for custom:button-card:

But implementation could be rather difficult...

Currently I am using yaml anchors for repeating code if possible.

Mariusthvdb commented 2 years ago

ofc I use anchors too, even nested, but with a large set up and split configuration, I still need a huge amount of repeats...

Mariusthvdb commented 4 days ago

just to give this a bump... would still be great to be able to set padding: 0 globally