galaxy icon indicating copy to clipboard operation
galaxy copied to clipboard

Render previews of notebooks

Open mvdbeek opened this issue 4 years ago • 4 comments

Screenshot 2020-10-21 at 13 21 48

Heavily inspired by https://github.com/galaxyproject/SARS-CoV-2/blob/03a07fd6f519e91806084847eec1b9b159095b8d/.vuepress/components/JupyterNotebook.vue, which we could probably mount directly instead of doing it like this. I think we'd probably also want to defer loading of the additional dependencies.

If we can figure that out we could also replace the server-side pysam use with https://github.com/GMOD/bam-js (and many more things).

mvdbeek avatar Oct 21 '20 11:10 mvdbeek

On Node.js, notebook.js runs all "text/html"-type outputs through DOMPurify. The browser-based version, however, does not ship with this library; to enable the default behavior, you must

I'm sure it is on your roadmap - just want to make sure it is sanitized before merged.

jmchilton avatar Oct 21 '20 14:10 jmchilton

We're hacking around this with import "!!script-loader!notebookjs"; right now since I couldn't figure out how to do regular imports there, but I think the upside is that the sanitizer should be loaded. Will definitely check though.

mvdbeek avatar Oct 21 '20 14:10 mvdbeek

Awesome - amazing and super cool then! What a great approach.

jmchilton avatar Oct 21 '20 15:10 jmchilton

I'm trying to dig up commentary, but when I proposed packaging https://github.com/galaxyproject/SARS-CoV-2/pull/87 for Galaxy, there was other pushback.

dannon avatar Oct 22 '20 00:10 dannon