deathbeds / ipydrawio

A standalone embedding of the FOSS drawio / mxgraph package into jupyterlab
https://ipydrawio.rtfd.io
Apache License 2.0
51 stars 4 forks source link

AWS icons are very distorted #48

Closed manics closed 3 years ago

manics commented 3 years ago

Description

AWS19 shapes are very distorted. I've idea whether this is a drawio issue, or if it's to do with how ipydrawio is embedding/configuring drawio.

Reproduce

  1. Launch JupyterLab

  2. Create a new ipydraw diagram

  3. Click the Shapes icon, then + More Shapes

  4. Select the AWS19 shape set, and Apply ipydrawio1

  5. Expand the AWS / Compute shape set, the icons are distorted ipydrawio2

The brower console shows http://127.0.0.1:8888/lab/extensions/@deathbeds/ipydrawio-webpack/static/dio/index.html?db=0&drafts=0&gapi=0&gh=0&gl=0&od=0&picker=0&stealth=1&svg-warning=0&thumb=0&tr=0&ui=sketch&embed=1&proto=json&configure=1&p=ex;tips;svgdata;sql;anim;trees;replay;anon;flow;webcola;tags is being loaded, and AFAICT it's related to the ui=sketch option.

If I open http://127.0.0.1:8888/lab/extensions/@deathbeds/ipydrawio-webpack/static/dio/index.html?ui=sketch , go through the prompts, and enable AWS19, I see the same distorted icons

If I open http://127.0.0.1:8888/lab/extensions/@deathbeds/ipydrawio-webpack/static/dio/index.html , go through the prompts, and enable AWS19 the icons look OK ipydrawio3

Context

Required: installed server extensions
$ jupyter server extension list
Config dir: $HOME/.jupyter

Config dir: $HOME/miniforge3/envs/drawio/etc/jupyter
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 3.0.16 OK
    nbclassic enabled
    - Validating nbclassic...
      nbclassic  OK

Config dir: /usr/local/etc/jupyter
Required: installed lab extensions
$ jupyter labextension list
JupyterLab v3.0.16
$HOME/miniforge3/envs/drawio/share/jupyter/labextensions
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)
        @deathbeds/ipydrawio-webpack v14.7.100 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio v1.1.0 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio-notebook v1.1.0 enabled OK (python, ipydrawio)
bollwyvl commented 3 years ago

Thanks for the full description!

Yep, sketch is pretty new, and rather aggressive in what it does to shapes. However, most folk seemed interested in the simplest-possible default, but we can go back to min (or kennedy) if it's not fully cooked.

In the meantime, you can change your default theme through the settings menu -> diagram theme. Or use the "Custom Diagram..." Launcher card and pick a different one. I tried making a launcher card for all the themes, but it was getting to be too much, and there's no official way to save it in an mxfile.

There was a new drawio release today, which I'm hoping to include in a 1.1.1 ipydrawio release in the coming days, and it claims to have some sketch fixes.

Anyhow, this might be worth validating upstream and/or reporting at jgraph/drawio.

bollwyvl commented 3 years ago

I merged #44 which is pretty close to being 1.1.1... it's probably worth checking out binder to see if it's still showing the condition on sketch, but the more i look at it, that's probably just what it's going to do. So that leaves us going back to min or the full kennedy as the default theme, which probably deserves a separate issue...

manics commented 3 years ago

Thanks for the quick response! drawio conveniently publish their master branch on github pages so it was easy to reproduce https://jgraph.github.io/drawio/src/main/webapp/index.html?ui=sketch

Created issue here: https://github.com/jgraph/drawio/issues/2071

davidjgraph commented 3 years ago

If you're just after the UI and don't care about the sketch effect itself, use ui=sketch&rough=0 as parameters.

bollwyvl commented 3 years ago

The default is back to min as of the release of #49, so one would have to actively seek the sketch stuff. closing this out.