Some paper components broken since maybe v0.115?

Since a few releases (I don’t know when exactly) lovelace started only loading styles required for the currently displayed things. This broke a card of mine, where I use paper-dropdown-menu html elements.

The issue is, it seems to not load some css required for this element. If I refresh the page, the elements are just shown as a list, unstyled:
image

Once I navigate to a page, where this html element is used by home assistant itself (or add a native card which contains a dropdown) the necessary styles are loaded and it looks as it should:
image

How can I tell Home Assistant to load the styles required for this component?

The source code can be found at https://github.com/chaptergy/lightalarm-card where the latest release still uses ha-paper-dropdown-menu in the card and paper-dropdown-menu in the config editor, but they behave identically.

I confirm with a component of my own.
Definitely something that changed in 0.115

I can also confirm this broke in 0.115. It looks like anything derived from the custom-cards/boilerplate suffers this fate.
The really weird thing for me is if I click on my user profile and then go back to the config visual editor it then looks correct (but this doesn’t last).

Yep, mine is derived from boilerplate as well.
My workaround is to just open a light more-info. That “fixes” the issue until next reload.

I’m far from a TS specialist. I guess some “import @polymer/paper-dropdown-menu” disappeared from the main webui, and I have no clue on how to do the equivalent in a boilerplate-derived custom component.

My workaround is adding a native card which uses the dropdowg, e.g. the entity card with an input_select.

I have no idea how to import it in the card either, which is why I opened an issue:

Maybe we’ll have to add polymer to the dependencies of the card? I’ll have to try that once I have the time.

This issue has been updated. https://github.com/home-assistant/frontend/issues/7098

We will be discussing soon how to create a method so that Custom Cards can import HA Core Frontend Elements. This will allow any Custom Card Developer to use the current elements that Core Frontend card use.

The lazy loading is reverted in 0.115.3. We will work on a solution for the next release.

1 Like

Is there any way to get things working again while waiting on the release? I downgraded to 0.115.2 but the custom-cards are not working, even after restarting Home-Assistant

[Update]
Grmpf … was an browser cache problem :slight_smile:
[/Update]

0.115.3 IS released :wink: