mapknitter
mapknitter copied to clipboard
Follow-up fixes to synchronous editing
Noting some suggested fixes/next steps to get synchronous editing working, from this comment by @sashadev-sky -- https://github.com/publiclab/mapknitter/pull/959#issuecomment-530625451
Live synchronous editing will not work I am fairly sure. The code itself has a lot of bugs and it throws errors. Also a lot of code smells, it recopied the code in Map.js that was there before I updated it here.
Mainly, heres the most problematic part: https://github.com/publiclab/mapknitter/blob/bdab16c0bb119700037198e0cb576b3d1d5519da/app/assets/javascripts/mapknitter/Map.js#L512-L528
The
data
parameter passed to the success function is always just going to be"success"
. Then in later functions this parameter is assumed to be a warpable.
If i were to try to fix this, how would I test synchronous editing? Not familiar with how this works
To illustrate how it is supposed to work, check out this comment by @ViditChitkara !
https://github.com/publiclab/mapknitter/pull/805#issuecomment-513361816
and https://github.com/publiclab/mapknitter/pull/957
Here's an in-progress GIF -- some bugs with it have already been fixed, but it shows how to test the system:
Hi @ViditChitkara do you think you could go through this and check on Sasha's suggestions? I'll work with Sebastian on the server side of things so let's just be sure this all works as expected in any edge cases!
That's great---will have to recall somethings related to this. Will get back on this!!
Left some comments on #959 . Let's see.
any suggestions here would be very helpful @publiclab/reviewers