thomasloven / lovelace-layout-card

🔹 Get more control over the placement of lovelace cards.
MIT License
1.04k stars 126 forks source link

2022.10.0 beta compatibility - view configuration no longer displays layout config options #212

Open kulmegil opened 1 year ago

kulmegil commented 1 year ago

My Home Assistant version: 2022.10.0b0

Layout-card version: 2.4.2

What I am doing:

  Testing next Home Assistant beta.

What I expected to happen:

  Layout card custom layouts and layout configuration controls visible in view configuration dialog in edit mode.

What happened instead:

  Vanilla HA dialog is shown.

Minimal steps to reproduce:

1) enter edit mode 2) edit any view configuration

Error messages from the browser console:


23:40:05.277 Uncaught (in promise) TypeError: can't access property "options", i.selector.select is undefined
    _schema https:///my.home-assistant.io:8123/hacsfiles/lovelace-layout-card/layout-card.js?hacstag=156434866242:215
    value https:///my.home-assistant.io:8123/frontend_latest/e2bd3888.js:532
    update https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    performUpdate https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    scheduleUpdate https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    _$EC https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    requestUpdate https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    firstUpdated https:///my.home-assistant.io:8123/hacsfiles/lovelace-layout-card/layout-card.js?hacstag=156434866242:215
    _$AE https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    performUpdate https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    scheduleUpdate https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    _$EC https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249
    requestUpdate https:///my.home-assistant.io:8123/frontend_latest/app.d41312b9.js:1249

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

piitaya commented 1 year ago

The subview option has been added. Look like it break the patch on the view editor.

But YAML support has been added to this editor. So I don't think this patch is needed anymore. WDYT @thomasloven ?

kulmegil commented 1 year ago

I did fix that with few simple tweaks to hui-view-editor.ts (sorry I haven't made a pull request in a long time and it was easier for me to write the code in comment)

    this._schema = (localize) => {
      const retval = this._oldSchema(localize);
      const typeSelector = retval.find(s => s.name === 'type');
      const layoutSelector = retval.find(s => s.name === 'layout');
      if (layoutSelector || !typeSelector) return retval;
      typeSelector.selector.select.options.push(
        ...LAYOUT_CARD_SELECTOR_OPTIONS
      );
      retval.splice(retval.indexOf(typeSelector) + 1, 0, {
        name: "layout",
        selector: { object: {} },
      });
      return retval;
    };

I justspotted the new yaml button. Personally I would prefer the controls to be visible straight away whenever I open the dialog.

joggs commented 1 year ago

Still broken in the 2022.10 release

Lapeno89 commented 1 year ago

same here

thomasloven commented 1 year ago

Should be fixed now.

thomasloven commented 1 year ago

By the way. Thanks to everyone who thumbed up joggs message instead of commenting "same" or "+1" or anything!

sagilo commented 1 year ago

I was trying to install this for few hours and didn't understand why the new tab isn't added :( I guess the UI tab is completely broken for 2022.10?

thomasloven commented 1 year ago

This new tab? bild

sagilo commented 1 year ago

This new tab? bild

Im relating to the "layout" tab under the dashboard configuration. In other words - the addon doesn't work at all for HA 2022.10 for me, I guess

thomasloven commented 1 year ago

Try looking at that excerpt from the readme one more time.

sagilo commented 1 year ago

Try looking at that excerpt from the readme one more time.

Im not sure what im missing, Ive went through all the steps a few times, making sure everything is set properly, yet, the layout tab isn't showing as this issue suggests.. If there is any log I can maybe help with it for troubleshooting

thomasloven commented 1 year ago

What you're missing is that you're looking for the tab that the readme says doesn't exist.

Please note that the "LAYOUT" tab in the animation below is now incorporated in the "SETTINGS" tab instead.

sagilo commented 1 year ago

What you're missing is that you're looking for the tab that the readme says doesn't exist.

Please note that the "LAYOUT" tab in the animation below is now incorporated in the "SETTINGS" tab instead.

Oh boy. I know see there is a note above the animation.. :( I guess it was't bold enough for me and I missed that. thanks!

jalejandro0211 commented 1 year ago

I'm using:

Home Assistant 2022.11.2 Supervisor 2022.10.2 Operating System 9.3 Frontend 20221108.0 - latest

It's the same, Layout isn't visible...

A30BL commented 1 year ago

Home Assistant 2022.11.3 Supervisor 2022.10.2 Operating System 9.3 Frontend 20221108.0 - latest

Bildschirmfoto 2022-11-17 um 12 53 35

Tontze commented 11 months ago

Im not sure if this is related, but if i add some configuration to place in picture, they do work, but are not visible ?

kuva