openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.21k stars 918 forks source link

Use CSS animations to show delayed loading spinner #5315

Closed AntonKhorev closed 1 week ago

AntonKhorev commented 1 week ago

Similarly to #5307, we can avoid scheduling/unscheduling js events to show spinners in the richtext preview #5311 and the sidebar loader:

image

There's a delay to avoid blinking on fast loads, that delay can be implemented using a css animation.

And we also can stop using vendor/assets/jquery/jquery.timers.js which does some ill-advised things like listening to unload.

tomhughes commented 1 week ago

Looks good to me, thanks.