fly-apps / live_beats

MIT License
1.26k stars 159 forks source link

Simplify a few things #22

Closed ndarilek closed 2 years ago

ndarilek commented 2 years ago

Given that this is meant to be a sample, I wanted to make a quick simplification pass. There were a few instances where I inserted various timeouts in order to fix things, which were actually workarounds for elements not being visible and me not knowing it. I was a bit too trigger-happy in adding these delays, so I removed an unnecessary requestAnimationFrame.

I also simplified the routing focus. It no longer restores the original tabindex after a delay. Unfortunately I couldn't track down why that delay was necessary, but I went with a simpler implementation that leaves a few more tabindex="1"s in the rendered output. In doing this I hope to make the sample more approachable for anyone wanting to implement accessible routing in a Phoenix app.

chrismccord commented 2 years ago

❤️❤️❤️🐥🔥