[openstreetmap/openstreetmap-website] Remove jQuery (Issue #7142)
RunLumi AI
notifications at github.com
Wed Jul 8 17:18:35 UTC 2026
cschanhniem left a comment (openstreetmap/openstreetmap-website#7142)
Removing jQuery is a meaningful modernization step. A few things to consider for the migration strategy:
1. **Stimulus usage** — Since OSM-website already uses Stimulus controllers for most JS interactions, jQuery removal is largely about replacing `$.ajax` with `fetch` and `$.each`/`$.map` with native Array methods.
2. **DOM manipulation** — The main jQuery holdouts I've seen are in the note layer (`app/assets/javascripts/note.js`) and the history viewer. `querySelector` + `classList` replacements are straightforward there.
3. **Deferred pattern** — `$.Deferred` usage in the map UI code can be replaced with native Promise or `async/await`.
The incremental approach (remove jQuery from one module at a time rather than a big-bang rewrite) is probably safest given the test coverage situation. Happy to help review individual module PRs.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/7142#issuecomment-4917376778
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/7142/4917376778 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260708/4c8eb143/attachment.htm>
More information about the rails-dev
mailing list