<p></p>
<p><b>@pablobm</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6295#discussion_r2499621731">app/assets/javascripts/index/new_note.js</a>:</p>
<pre style='color:#555'>> -  addNoteButton.on("click", function (e) {
-    e.preventDefault();
-    e.stopPropagation();
-
-    if ($(this).hasClass("disabled")) return;
-
-    OSM.router.route("/note/new");
-  });
</pre>
<p dir="auto">In the interest of separation of concerns, would it be possible to move these back into their modules, but as functions that can are called from <code class="notranslate">initializeMapButtons</code>?</p>
<p dir="auto">So for example, this code here could live as <code class="notranslate">OSM.NewNote.initialize()</code>, called from <code class="notranslate">OSM.initializeMapButtons</code>.</p>
<p dir="auto">It's not trivial because then there's the question of what to do with the routes, which are functions... I played a bit with the idea at <a class="commit-link" href="https://github.com/hlfan/openstreetmap-website/compare/lazy-load-controllers...pablobm:lazy-load-controllers">hlfan/openstreetmap-website@<tt>lazy-load-controllers...pablobm:lazy-load-controllers</tt></a>. What do you think?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6295#discussion_r2499621731">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNJ6ZTGSOWXLQUA3LD33NWLFAVCNFSM6AAAAACDGDWSEWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTIMRZGAZDAOJUHA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLO47YU3HZTFRLV7D4L33NWLFA5CNFSM6AAAAACDGDWSEWWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTWMMK2RI.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6295/review/3429020948</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6295#discussion_r2499621731",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6295#discussion_r2499621731",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>