contentful-graph icon indicating copy to clipboard operation
contentful-graph copied to clipboard

Output to diagrams.net

Open s5no5t opened this issue 4 years ago • 3 comments

It would be super useful to support the file format of diagrams.net, which would allow editing the graphs after exporting them from Contentful.

s5no5t avatar Sep 30 '20 10:09 s5no5t

Hi @jugglingthebits I'm not familiar with diagrams.net, but it looks like it is a drawio underneath? If I remember correctly it was using xml-like documents. I tried importing SVG but it doesn't recognize them.

Idea of contentful-graph was simple, it was creating *.dot text files which are later being parsed and converted into nice diagrams with graphviz. So the main work was actually done by that wonderful tool.

In order to export it to drawio format, one can either use (quick googling) something like this graphviz2drawio, or implement whole layouting from scratch. Maybe also there is a way to convert SVG into a drawio XML structure, not sure.

My problem with that would still be that once you export and start edit the schema, it would not be possible to re-sync, if structure would change on Contentful side.

I wish contentful would implement such a UI designer directly in their product :)

lotas avatar Sep 30 '20 11:09 lotas

I'm not familiar with diagrams.net, but it looks like it is a drawio underneath?

That's right.

In order to export it to drawio format, one can either use (quick googling) something like this graphviz2drawio, or implement whole layouting from scratch.

I tried graphviz2drawio today and it didn't work for me at all. Besides, I think this functionality would nicely fit into contentful-graph.

My problem with that would still be that once you export and start edit the schema, it would not be possible to re-sync, if structure would change on Contentful side.

I agree, although I don't see it as a big issue. My use case would be to take whatever is the latest model in Contentful and use diagrams.net to evolve it to the next step - this doesn't require re-sync.

I wish contentful would implement such a UI designer directly in their product :)

I agree :-)

Would you take PRs that implement a --format=drawio param for contentful-graph?

s5no5t avatar Sep 30 '20 12:09 s5no5t

Would you take PRs that implement a --format=drawio param for contentful-graph?

That would be amazing! Thank you.

lotas avatar Sep 30 '20 16:09 lotas