Hashnode / support

Your go-to guides for understanding Hashnode a little better.
https://support.hashnode.com/
48 stars 48 forks source link

Theme switcher text animation is ugly, disorienting and janky #7

Closed PuruVJ closed 3 years ago

PuruVJ commented 3 years ago

The problem

When you switch themes, the text animation is very janky and disorienting, and would be much worse for those with motion sickness.

I propose to get rid of the animation entirely. It's looking much better without the animation.

Before:

https://user-images.githubusercontent.com/47742487/106613371-1d86c680-6590-11eb-912a-6a3aad8d259c.mp4

(Note: This animation is much worse without recording. It's not janking as much during the recording.

After:

https://user-images.githubusercontent.com/47742487/106613802-97b74b00-6590-11eb-96c0-d77042dd7091.mp4

The theme change effect pops out more than I'd like it to, but it's at least a bit better.

I love this initiative by Hashnode. You folks are just killing it. I'd love to contribute.

If I have your permission, can I open a PR to fix this? It's a one liner in the CSS.

Thanks

PuruVJ commented 3 years ago

I wish it was possible to make it as smooth like my blog's (https://puruvj.dev) theme switcher, but I guess Docusaurus uses Context or an in-React solution to switch themes, making everything re-render, and overall, quite janky. If it was CSS vars all through, then that would've been different

// Sorry for the shameful plug, but I needed to reference smooth animation 😅

Megha-Pathak commented 3 years ago

@PuruVJ you are requested to be polite while you share with us or anyone, how their Open source project can be improved :)

And yes you can go ahead and submit your Patch for the toggle button. We will review it.

PuruVJ commented 3 years ago

@PuruVJ you are requested to be polite while you share with us or anyone,

Yeah, I gotta work on that 😅

All right, I'll make the PR soon