mapknitter icon indicating copy to clipboard operation
mapknitter copied to clipboard

Follow-up fixes to synchronous editing

Open jywarren opened this issue 5 years ago • 4 comments

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:

jywarren avatar Oct 18 '19 13:10 jywarren

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!

jywarren avatar Dec 06 '19 14:12 jywarren

That's great---will have to recall somethings related to this. Will get back on this!!

ViditChitkara avatar Dec 09 '19 05:12 ViditChitkara

Left some comments on #959 . Let's see.

ViditChitkara avatar Dec 09 '19 05:12 ViditChitkara

any suggestions here would be very helpful @publiclab/reviewers

ViditChitkara avatar Dec 09 '19 05:12 ViditChitkara