Xzensi / NipahTV

✨ NipahTV - A Better Kick and 7TV Emote Extension for Kick ✨
https://nipahtv.com
8 stars 2 forks source link

QoL: Collapsed channel sidebar should be kept collapsed when leaving theater mode of player #51

Open RevSnowfox opened 5 months ago

RevSnowfox commented 5 months ago

The channel sidebar opens up when you leave the player's theater mode, even if it was collapsed before. That's so dumb.

Xzensi commented 5 months ago

Took a look at it, apparently it's because Kick in their infinite wisdom decided it's a good idea to just completely delete the entire sidebar when you entire theatre mode and re-create it when leaving theatre mode, however they forgot to remember the previous state of it (likely on purpose).

Although it's scope creep getting further and further from original purpose of NipahTV I do feel like it'll be alright to add more of these userinterface QoL.

Implementation thoughts:

A simple fix would be to just fire an click event on the sidebar collapse button, but this means anytime you leave theatre mode you'll see the sidebar collapsing animation which imo is somewhat annoying and unpleasant. By the looks of it seeing how Kick uses Tailwind which sets and changes a million classes on all of its descendant elements just to collapse it. This means to encode this state makes it highly coupled and extremely prone to breaking whenever Kick changes the website.

Alternatively taking the sidebar out of the DOM before Kick has a chance to destroy it could be an option, but is likely to be a no-go considering the internal eventlisteners and react/vue databindings would no longer be the same.