drawio-obsidian icon indicating copy to clipboard operation
drawio-obsidian copied to clipboard

Certain more shapes don't seem to load

Open lvnilesh opened this issue 4 years ago • 8 comments
trafficstars

Thanks for awesome integration of diagrams.net into obsidian. It is working very nicely.

I click Shapes > + More Shapes and added AWS 3D, Kubernetes. However, the proper shapes did not load.

I notice that these "More shapes" load correctly on https://www.diagrams.net

What am I missing?

Appreciate your help.

lvnilesh avatar Sep 07 '21 05:09 lvnilesh

Thanks for testing the plugin. I've tried to ensure that the plugin works offline as much as possable - mostly for my personal use case - by intercepting requests that draw.io makes and serving them from files that are bundelled in with the plugin's source code. Adding more shapes attempts to download the stencil file (you'd see a message about a missing "stencils/aws3d.xml" in the developer console) but I havn't included all these in the plugin.

A better fix is probably to catch these requests and either allow them to be made to the origional location if you're online or (potentially with some cache), or display a meaningful message if you're offline.

I'll investigate what the potential options are.

zapthedingbat avatar Sep 07 '21 14:09 zapthedingbat

Would it an option to load additional XML files from disk? That way you could leave the base plugin as minimal as you want and give users the option to download them from https://github.com/jgraph/drawio-libs/ (also total kudos for the plugin 🙌)

retgits avatar Sep 08 '21 00:09 retgits

Thanks.

Just an observation... the obsidian-excalidraw-plugin stores these extra "library" elements offline in a data.json file located next to the plugin main file.

tree -La 4 .obsidian/plugins

...

.
├── drawio-obsidian
│   ├── main.js
│   ├── manifest.json
│   └── styles.css
├── obsidian-excalidraw-plugin
│   ├── data.json
│   ├── main.js
│   ├── manifest.json
│   └── styles.css

...

lvnilesh avatar Sep 08 '21 02:09 lvnilesh

I've updated this behavour with v1.5.0. Is will now attrmpt to download the shape files if you are online. It's not a complete solution, in that it the file isnt cached to work offline so i'll keep the issue open for now.

zapthedingbat avatar Oct 21 '21 15:10 zapthedingbat

I'm online, but still having the problem (I just verified I'm using version 1.5.0). I'm trying to use the Cisco19 icons but they're showing up as blank squares. What's weird is that the red icon is showing up as a red empty square, so something is getting through.

Update: I just tried uninstalling the plugin, restarting Obsidian, reinstalling and re-enabling Diagrams and I'm still not getting the Cisco19 icons.

Thanks for your hard work!

image

IDtheTarget avatar Nov 05 '21 13:11 IDtheTarget

Version 1.5.0 -- In the below image, it shows how it actually appears.

Snipaste_2022-01-13_17-12-30

mevin-e avatar Jan 13 '22 13:01 mevin-e

Thanks @zapthedingbat for the plugin effort :clap:!

Do we have a fix for this issue or not yet? I have v1.5.0 installed *and still shows this behavior.

baseely avatar Dec 10 '23 16:12 baseely