ljmerza / light-entity-card

Control any light or switch entity
MIT License
228 stars 41 forks source link

fix #84: 2022.3.X Breaks dropdown #85

Closed regevbr closed 2 years ago

regevbr commented 2 years ago

fix: #84

So according to https://developers.home-assistant.io/blog/2022/02/18/paper-elements/ all paper elements are not supported anymore starting 2022.3 and they recommend using mwc components instead. The current behavior is a complete breakdown of the dropdown menus.

The fix is based on my work on https://github.com/artem-sedykh/mini-climate-card/pull/67

Need to note that this is probably will not work on previous versions of HA and as such, I added a comment in the readme and updated the version to 5 (as this is a breaking change).

@ljmerza if you can take it from here it will be awesome :-)

To use the fix until it is released, follow the steps I made here

regevbr commented 2 years ago

I couldn't find a quick way to exclude certain files from being bundled with webpack, so I changed webpack to roolup. If you prefer, you can undo that, as long as you preserve the behavior.

regevbr commented 2 years ago

@ljmerza there is an issue though that I don't know how to fix. When you open the dropdown menu in a mobile view, and the button is positioned at the top of the view like that: Screenshot-20220313230920-363x748

The menu isn't opening properly, and causing the containing card to be "stretched" like so:

Screenshot-20220313230932-356x768

ljmerza commented 2 years ago

merging to develop so i can take a look