[openstreetmap/openstreetmap-website] Instantiate controller only once needed (PR #6295)

Marwin Hochfelsner notifications at github.com
Tue Aug 5 21:14:55 UTC 2025


Second part of #6291.

Perhaps the event handler initialization would be better located in something like `OSM.initializeContextMenu`.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Move controller invoking event handlers outside said controllers
  * Instantiate controller only once needed

-- File Changes --

    M app/assets/javascripts/index.js (82)
    M app/assets/javascripts/index/new_note.js (9)
    M app/assets/javascripts/index/query.js (47)
    M app/assets/javascripts/index/search.js (32)
    M app/assets/javascripts/router.js (7)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/6295 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250805/bfa2773c/attachment.htm>


More information about the rails-dev mailing list