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

![image](https://github.com/user-attachments/assets/238f7ea7-f2e1-45c7-8ac4-e6f42ac3c2f0)

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`](https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event).
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5315

-- Commit Summary --

  * Show spinner using delayed css animation in richtext preview
  * Show spinner using delayed css animation in sidebar loader

-- File Changes --

    M app/assets/javascripts/index.js (11)
    M app/assets/javascripts/richtext.js (9)
    M app/assets/stylesheets/common.scss (12)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5315.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5315.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5315
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to