vertical-stack-in-card icon indicating copy to clipboard operation
vertical-stack-in-card copied to clipboard

Visual editor does not work with the label horizontal: true

Open BBE-FR opened this issue 1 year ago • 7 comments

Visual editor is a very nice addition to the latest version !!

It is working well, even if you use an horizontal stack inside a custom vertical stack to create a "fake" custom horizontal stack with visual editor: image like this

type: custom:vertical-stack-in-card
cards:
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-template-card
      etc...

You can see that in this case we have the same issue as https://github.com/ofekashery/vertical-stack-in-card/issues/150

But if you try to use the label horizontal: true to get rid of the horizontal stack, it works very well in YAML, without the borders appearing, but the visual editor is broken:

type: custom:vertical-stack-in-card
horizontal: true
cards:
  - type: custom:mushroom-template-card
  etc...

The visual editor does not work anymore: image With the following warning (translated from french) :

Visual editor is not available for this configuration:
- "horizontal" key not expected or not available for visual editor 
You can edit your configuration through YAML

I know the card is named vertical-stack-in-card but it works so well that I think the horizontal option deserve to be implemented in the editor...

BBE-FR avatar Sep 26 '24 15:09 BBE-FR

It's indeed a bug caused by using the visual editor implementation of hui-vertical-stack-card, which does not contain the horizontal option. I'll look into it - thanks for the report :)

ofekashery avatar Dec 12 '24 23:12 ofekashery

The new release (1.0.1) is now support a visual editor also for horizontal cards 🪄

ofekashery avatar Dec 13 '24 20:12 ofekashery

Hi @ofekashery but the problem is that preview will always be vertical stack, every change in the editor will delete the label horizontal and the config will be saved without it. 🤷‍♂️

ngocjohn avatar Dec 14 '24 06:12 ngocjohn

Hi @ofekashery but the problem is that preview will always be vertical stack, every change in the editor will delete the label horizontal and the config will be saved without it. 🤷‍♂️

+1

edit: i dont see any option for horizontal card in visual editor in 1.0.1

pafnow avatar Dec 16 '24 12:12 pafnow

Thanks for the report @ngocjohn @pafnow - I'm aware of this issue.

I'm working on a new solution which is introducing a new fresh editor for the card. Hope to update soon!

ofekashery avatar Dec 19 '24 16:12 ofekashery

Any updates on this issue?

ciotorcristian avatar Mar 30 '25 13:03 ciotorcristian

Any updates on this issue?

lpt2007 avatar Apr 21 '25 13:04 lpt2007

It's not only eating "horizontal: true", it eats the full formatting, this all goes away:

          - type: custom:vertical-stack-in-card
            horizontal: true
            styles:
              margin-left: 2px
              margin-right: 2px
              margin-bottom: 4px
              border-style: solid
              border-color: black
              border-width: 2px
              border-radius: 10px
              height: 110px

I hope this card isn't abandoned, I really like it!

Mastiffen avatar Aug 21 '25 07:08 Mastiffen

There is a workaround in #178 now. I also like this card, hope we get a proper fix soon.

evest avatar Sep 04 '25 12:09 evest