<p></p>
<p dir="auto">I didn't want to refactor anything but the code is written in such a way...</p>
<p dir="auto">The biggest change here is that the map object also gets to treat notes as "current objects". Before that it used to do this with elements and changesets.</p>
<p dir="auto">Why did I do this:</p>
<ol dir="auto">
<li>I want to open the note with remote control when the edit link is clicked. But the edit link doesn't contain any information about the note.</li>
<li>Then I need to change the code that updates the link. I discover that it takes the "current object" from the map and adds it as a parameter. But the note is never added as a "current object" to the map.</li>
<li>Then I have to add notes as "current objects". That's the most significant change.</li>
</ol>
<p dir="auto">If you want all this to be split in smaller chunks, the first one would be the "current object". Actually it's the first commit, except for the test cases (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/02ab1d338cfb8837c4623e7cebfc25ec0ae360b2/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/02ab1d338cfb8837c4623e7cebfc25ec0ae360b2"><tt>02ab1d3</tt></a>) + the second commit to fix how the note id is passed when commenting/closing/reopening he note (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/openstreetmap/openstreetmap-website/commit/591a7464127f5a0e884e34cc4480d257ebc44cb9/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/commit/591a7464127f5a0e884e34cc4480d257ebc44cb9"><tt>591a746</tt></a>). Do you want a separate PR with that?</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/3718#issuecomment-1257853594">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLO2VNJULTVC6LDKCFDWAF6QFANCNFSM6AAAAAAQUZ2EEI">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLK62DFYUZOQHZBVUKDWAF6QFA5CNFSM6AAAAAAQUZ2EEKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSK7FJJU.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/3718/c1257853594</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/3718#issuecomment-1257853594",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3718#issuecomment-1257853594",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>