elchininet / custom-sidebar

Custom HACS plugin that allows you to personalise the Home Assistant's sidebar per user or device basis
Apache License 2.0
60 stars 4 forks source link

Manage the blocking of the sidebar title events with the sidebar CSSs #142

Closed elchininet closed 1 month ago

elchininet commented 1 month ago

This pull request changes how to apply the CSS styles to the sidebar header when the sidebar_editable property is set as false. Instead of accesing the elements and change their CSS through their style property, fixed CSS rules are added to the sidebar custom CSSs, and these CSS rules are activated when a data-parameter is present in the menu element. On top of that, instead of querying the shadowRoot of the sidebar, the menu element is retrieved in an async way using query feature of home-assistant-query-selector.

coveralls commented 1 month ago

Coverage Status

coverage: 99.766% (+0.4%) from 99.318% when pulling 7c1c68737e672c544e52ef65ef017b30d2502da0 on manage_menu_block_with_styles into dc1c291fd572e34e906f02d76b8cf04a7fcaca57 on master.