-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for nbinteract #82
Comments
This sounds good! You've listed all the important steps needed to add nbinteract support. I think adding support won't be hard. Communicating how to add interactivity will be trickier though, since it requires authors to learn the Sadly, my cycles are quite full at the moment. Do you have a timeline in mind @choldgraf ? |
@SamLau95 what's an example of a notebook that could be used to demo nbinteract? Does it only run the contents of cells and then render the output as widgets? Or does it require a particular notebook configuration etc? |
If it doesn't require any special notebook setup, then perhaps some of the rendering could be offloaded onto Thebelab w/ jupyter-book/thebe#102 |
I think this notebook is a useful demo: https://github.com/SamLau95/nbinteract/blob/master/docs/notebooks/examples/examples_sampling_from_a_population.ipynb Any other notebook in that You don't have to modify the notebook at all for nbinteract to work. Instead, you have to load and run the nbinteract JS package on an HTML page with Jupyter cells. For example, this is the code we load in the nbinteract converter: https://github.com/SamLau95/nbinteract/blob/master/nbinteract/templates/partial.tpl For the Data 100 textbook, we use the following code: https://github.com/DS-100/textbook/blob/master/assets/js/scripts.js#L133-L160 |
ok sounds great - in that case it shouldn't be too hard to get this working, since that's the same pattern that thebelab uses as well. |
changing underscore to hyphen for hide and remove tags
Does jupyter book support nbinteract at this moment? |
@luukalt |
Thanks @choldgraf! What should be done to include nbinteract manually (since I like the look way better than thebe)? |
hmmm - I'm not sure exactly, I'd recommend checking out the docs on custom JS code and try to figure it out from there |
A previous version of Jupyter Book added support for nbinteract, an interesting project from @SamLau95 that facilitated interactive visualizations using Binder. It's similar to Thebelab, though focused around creating interactive widgets instead of editable code cells.
I'd like to see Jupyter Book support nbinteract once more - @SamLau95 do you have guidance on the path-of-least-resistance to doing this? I'm thinking:
nbinteract.js
that is called from the button: https://github.com/jupyter/jupyter-book/tree/master/_includes/js_config.yaml
(maybe co-opting the binder config)What do you think?
The text was updated successfully, but these errors were encountered: