ua-snap / ardac-explorer

ARDAC GUI Explorer
0 stars 0 forks source link

Attempt to embed Jupyter notebook into item component #20

Closed cstephen closed 8 months ago

cstephen commented 8 months ago

This PR is the result of my exploration of embedding a JupyterLite notebook inside a Vue component (or web page, generally). It doesn't work great, but as far as I can tell this is the best we can do. I've set this PR to draft mode because it is likely a dead end that we won't want to merge.

I started out by searching how to embed JupyterLite notebooks into a web page. The resources I found (example) showed how to embed an interactive JupyterLite shell (REPL) into a page, but not an already-made notebook. There was no magic here, just an HTML iframe.

If iframes are good enough for an interactive Python shell, I figured I'd try using a similar approach to embed our JupyterLite notebooks directly into a Vue component.

The good news:

The bad news:

So, I think the bad outweighs the good here and it would be better to link to Jupyter notebooks directly (via JupyterLab) from the item teaser "card" without an intermediate ARDAC page.