lovelace-layout-card icon indicating copy to clipboard operation
lovelace-layout-card copied to clipboard

`mwc-tab-bar` Does Not Render/Is Not Present in Sections View

Open Nerwyn opened this issue 7 months ago • 0 comments

My Home Assistant version: 2024.7.0

Layout-card version (FROM BROWSER CONSOLE):

What I am doing: Using the layout-card editor in an experimental sections view, without previously navigating to a non-sections view (to prevent mwc-tab-bar from being loaded and available for custom cards to use) or refreshing the page after using the add card dialog.

What I expected to happen: mwc-tab-bar to render like it does on traditional views.

What happened instead: mwc-tab-bar doesn't seem to load in the new sections view. Custom cards that reference it end up not loading anything.

Minimal steps to reproduce:

  1. Create a new view of type Sections (experimental).
  2. Click the add card button in a section.
  3. Note the mwc-tab-bar element in use at the top of the add card dialog.
  4. Add a Custom: Layout Card. Note how the layout/cards tab bar is visible.
  5. Save the layout card and then refresh the page.
  6. Edit the previously created layout card. Note how that since no Home Assistant elements loaded mwc-tab-bar, it does not render in the layout card editor. image
type: custom:layout-card
layout_type: masonry
layout: {}
cards: []

Error messages from the browser console:

NA

Other notes:

I ran into this issue with the config UI of one of my custom cards as well. I ended up switching to paper-tabs as those should always be present in Home Assistant views due to their use as the view buttons and the config/visibility/layout selector.


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

  • [x] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
  • [x] Have made sure I am using the latest version of the plugin.
  • [x] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
  • [x] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

Nerwyn avatar Jul 04 '24 07:07 Nerwyn