[openstreetmap/openstreetmap-website] Load notes with remote control (PR #3718)

Anton Khorev notifications at github.com
Mon Sep 26 10:57:06 UTC 2022


I didn't want to refactor anything but the code is written in such a way...

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.

Why did I do this:
1. 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.
2. 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.
3. Then I have to add notes as "current objects". That's the most significant change.

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 (https://github.com/openstreetmap/openstreetmap-website/pull/3718/commits/02ab1d338cfb8837c4623e7cebfc25ec0ae360b2) + the second commit to fix how the note id is passed when commenting/closing/reopening he note (https://github.com/openstreetmap/openstreetmap-website/pull/3718/commits/591a7464127f5a0e884e34cc4480d257ebc44cb9). Do you want a separate PR with that?

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

Message ID: <openstreetmap/openstreetmap-website/pull/3718/c1257853594 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220926/55ca8c17/attachment.htm>


More information about the rails-dev mailing list