Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.44k stars 39 forks source link

Horizontal buttons stack > Highlight Current View is not activating #569

Closed Micah-S closed 2 weeks ago

Micah-S commented 3 weeks ago

The highlight_current_view option for a Horizontal buttons stack is not applying the appropriate classname when on the selected page.

I did some digging and noticed the event listener is never firing due to being an invalid event type: https://github.com/Clooos/Bubble-Card/blob/37be1b9bcbf1b856b8b2f9cb8266632b718d5de4/src/cards/horizontal-buttons-stack/create.ts#L65

The correct method is documented here:

window.navigation.addEventListener('navigate', handleUrlChange); 
Clooos commented 3 weeks ago

Nice catch! It was indeed something we forgot to change during the refactoring.

I will fix that in the next release!

Clooos commented 2 weeks ago

This is now fixed in v2.0.4, thanks again for the feedback!

https://github.com/Clooos/Bubble-Card/releases/tag/v2.0.4