tasking-manager icon indicating copy to clipboard operation
tasking-manager copied to clipboard

iD editor version upgrade

Open ramyaragupathy opened this issue 1 year ago • 6 comments

We are still using a somewhat outdated version of iD (v2.21.1 – the most recent version of iD is v2.25.2) in the tasking manager.

cc @eternaltyro @emi420 @Aadesh-Baral @HelNershingThapa

ramyaragupathy avatar May 10 '23 13:05 ramyaragupathy

This should also cover the maxar key update - which was applied as a hotfix through a temporary solution.

ramyaragupathy avatar May 10 '23 13:05 ramyaragupathy

Hello, I updated iD to version 2.26.2 for our use at tasks.opensidewalks.com here: OpenSidewalks@786c5108b03713463ed77194be13638ef03fd4a8

I reworked the integration to avoid the direct bundling of iD code with the tasking manager JS. This gets around an issue with the output of iD's newer esbuild bundling system and significantly improves the tasking manager build time. I'm inclined to apply the same treatment for RapiD to remove the need for the special upstream releases.

Let me know if this is worth a PR or if HOT is pursuing a different upgrade strategy.

cyrossignol avatar Aug 03 '23 16:08 cyrossignol

@cyrossignol - thanks for checking on this. Your idea sounds good, could you please go ahead making a PR for our team to go through this in detail?

cc @HelNershingThapa @tsmock @d-rita

ramyaragupathy avatar Aug 08 '23 09:08 ramyaragupathy

I'll have to check and see how well it works with Rapid. Of specific note, I don't know if waiting for Rapid to finish "loading" (via script.onload) will work -- Rapid does a lot of setup async now (current main, should be released sometime soon).

I haven't touched the iD code, but iD also doesn't have as much backend changes going on.

tsmock avatar Aug 08 '23 12:08 tsmock

I've been playing around with the script loading stuff since Rapid v2.1 was released.

Some comments on how it improved the build experience and could (potentially) make it much easier to update out-of-band:

  • We can use a CDN (e.g. https://cdn.jsdelivr.net/npm/@rapideditor/rapid@~2.1.0/dist/rapid.js)
  • Pro: Reuse of rapid download between TM instances
  • Con: Dependent upon free CDN
  • It significantly reduces the build time for me -- as in 18 minutes to 3 minutes for me.

If anyone wants to play with that (for Rapid), I've got a branch here: https://github.com/facebook/OSM-HOT-Tasking-Manager/tree/chore/update-rapid

Notes:

  • I'm debugging an issue with task switching; if you start a task, then switch to a different task, Rapid doesn't reload. The work around is a hard refresh. I have another (code) workaround, but it makes the Rapid UI jittery (I think two input events are getting fired for the same input).

tsmock avatar Aug 30 '23 22:08 tsmock

Check this branch, I've uploaded a working version here:

https://github.com/hotosm/tasking-manager/tree/upgrade/id

emi420 avatar Aug 21 '24 03:08 emi420