publiclab/mapknitter

Follow-up fixes to synchronous editing

Aperta

#1097 aperta il 18 ott 2019

 (4 commenti) (0 reazioni) (0 assegnatari)Ruby (203 fork)auto 404
bughelp wanted

Metriche repository

Star
 (274 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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:

Guida contributor