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

Visual editor does not work with the label horizontal: true #162

Open
BBE-FR opened this issue Sep 26, 2024 · 5 comments
Open

Visual editor does not work with the label horizontal: true #162

BBE-FR opened this issue Sep 26, 2024 · 5 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@BBE-FR
Copy link

BBE-FR commented Sep 26, 2024

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 #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...

@ofekashery
Copy link
Owner

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 ofekashery added bug Something isn't working good first issue Good for newcomers labels Dec 12, 2024
@ofekashery
Copy link
Owner

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

@ngocjohn
Copy link

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. 🤷‍♂️

@pafnow
Copy link

pafnow commented Dec 16, 2024

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

@ofekashery
Copy link
Owner

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 ofekashery reopened this Dec 19, 2024
@ofekashery ofekashery added enhancement New feature or request and removed good first issue Good for newcomers labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants