drawdata icon indicating copy to clipboard operation
drawdata copied to clipboard

Can the JavaScript code that's used on the website be included in this repo as well?

Open Arpanio opened this issue 4 years ago • 7 comments

I see that this repository only has the Python wrappers to the JS code. Can the JS code be included here as well?

Arpanio avatar May 14 '21 18:05 Arpanio

It's currently linking to HTML yes. I was thinking of maybe running it as a local template but I didn't have the time to get around to that yet.

koaning avatar May 14 '21 19:05 koaning

I've tried pointing to the HTML locally with Iframes but then there needs to be a server properly hosting them, which doesn't really play nice with jupyter security settings.

koaning avatar May 14 '21 19:05 koaning

Solving that will be necessary for the python repo to make sense... That's true.

Is there a separate repo for the JS code? I want to play around with this, so I am primarily interested in the JS code to be honest.

Arpanio avatar May 14 '21 19:05 Arpanio

I've tried pointing to the HTML locally with Iframes but then there needs to be a server properly hosting them, which doesn't really play nice with jupyter security settings.

Would it make sense to have a bash script included with the module, which can be run from the Jupyter notebook using ! (to call the bash process)?

Arpanio avatar May 14 '21 19:05 Arpanio

If you follow the url you'll see the js code hosted next to the html.

koaning avatar May 14 '21 21:05 koaning

It would be really nice if we could fork or even contribute to the JS code. I don't have experience in developing for Jupyter, but what about making drawdata a Jupyter Extension? Wouldn't that allow executing the required JS?

And thanks for this work @koaning, it's a great teaching resource.

falcaopetri avatar Sep 19 '21 18:09 falcaopetri

I'm open to making it an extension, but it'd be preferable if it would also run with users needing to install ipywidgets. I tried running it with python's Template class but that wouldn't work without hosting an iframe.

I'm certainly open to ideas here, the current implementation is indeed a quick hack to see if folks were interested. Looking at the stats there's some interest, but it's not that much.

koaning avatar Sep 19 '21 19:09 koaning

There's a new anywidget method that we'll use going forward instead. Should fix this issue!

koaning avatar Feb 24 '24 12:02 koaning