egon.io icon indicating copy to clipboard operation
egon.io copied to clipboard

Load .dst file from public URL dynamically

Open JJediny opened this issue 6 years ago • 2 comments

Is your feature request related to a problem? Please describe. While collaborative editing #66 seems an unreasonable lift (websockets and all), having the ability to dynamically load a url as a file import via a url construction would solve alot of the workflow around shared editing/re-loading/displaying of exported files to continue to edit.

Describe the solution you'd like I as a user would atleast like to maintain a github gist (etc), to give me a stable/public url, where I can continue to make updates without the url changing to a .dst file. If I was able to append that URL as part of the editor's URL to auto load, then all I would need to do to update and maintain my Domain Knowledge diagram would be load the full URL, make updates, re-download/update the github gist to version it. Next time I revisit the updated diagram would be there for me to pick up again.

Describe alternatives you've considered Mermaid live editor uses a base64 scheme to encode the file contents to make it a shareable url:

  • https://mermaidjs.github.io/mermaid-live-editor
  • https://github.com/mermaidjs/mermaid-live-editor/blob/master/src/components/Edit.js
  • Example - https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbkFbUHJvZHVjdGlvbiBBcHBsaWNhdGlvbl0gLS0-TltVc2VyIGRyaXZlbiBldmVudF1cbk4gLS4tPiBMW0dvb2dsZSBBbmFseXRpY3NdXG5OIC0tPiBCW0FXUyBDbG91ZFdhdGNoXVxuQiAtLi0-IE9bS2luZXNpc11cbk8tLi0-SlxuRCAtLT4gTVtSYXcgZGF0YSBzMyBidWNrZXRdXG5NIC0tPiBDW0xhbWJkYSBQYXJzZXJdXG5DIC0tPiBHW0hvdCBidWNrZXQgLUludGVybWVkaWF0ZSBTMyBidWNrZXRdXG5HIC0tPiBJW0xhbWRiYSAtUmVkU2hpZnQgTG9hZGVyXVxuSSAtLT4gSltSZWRTaGlmdF1cbkogLS0-IEhbQVdTIFF1aWNrU2l0ZV1cbkogLS4tPiBLW0JsYXplcl1cbk4gLS0-IERbTG9nc3Rhc2hdXG5EIC0tPiBFW0VsYXN0aVNlYXJjaF1cbkUgLS0-IEZbS2liYW5hXVxuXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ

Additional context The editor does need some ability to save state on the internet and dynamically load from it to be useful in standard practice.

JJediny avatar Oct 19 '19 03:10 JJediny

Loading/saving models from/to a stable public URL could improve collaboration. Using gist is certainly an option. Alternatively encoding the whole model in the URL is not an option as we have to include the SVG of all icons as well (to support custom icons). The resulting strings (even if base64) can get really long and might exceed browser's URL limits.

hofstef avatar Mar 26 '20 10:03 hofstef

Loading files from CORS-enabled enpoints denoted in a URL fragment will improve collaboration workflows a lot.

almereyda avatar Jul 02 '23 14:07 almereyda