[openstreetmap/openstreetmap-website] [WIP] Load js controller modules only when needed (PR #7147)
Marwin Hochfelsner
notifications at github.com
Wed Jun 10 17:49:46 UTC 2026
hlfan left a comment (openstreetmap/openstreetmap-website#7147)
> Does `app/assets/javascripts/index_modules/history-changesets-layer.js` need to get the `export` line too?
It's only used in the history module - I didn't want to change the `require` line unless necessary, which it isn't here.
> Sorry, I don't understand the question 😓 Can you rephrase, please?
In https://github.com/openstreetmap/openstreetmap-website/pull/6295#discussion_r2499621731, you argued for having the event handlers that invoke some modules inside the respective files, which is now handled with `OSM.initializations`. Now, with these files being read later, if at all, this won't work.
To keep the git history, I moved them out of the way into `index/initializations.js
` and wanted to move them back in 9e4bc99af405ed39acc55748f54b8cc0ca2c1019, which then confused git and caused the https://github.com/openstreetmap/openstreetmap-website/labels/big-pr label. But I don't think that eight dozen lines should be split up into three different files, just for separation of concerns.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7147#issuecomment-4672869723
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/7147/c4672869723 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260610/041d4d8f/attachment.htm>
More information about the rails-dev
mailing list