-
Notifications
You must be signed in to change notification settings - Fork 947
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
Static widgets #16
Comments
+1. If I'm interpreting correctly, it's a widget that you can embed on any webpage/get raw HTML. I would love to see this and am currently using the unsupported ipywidgets. |
+1. Using Nbconvert or Nbviewer with widgets would be neat feature for teaching people without access to ipython/jupyter. |
I'm confused, is it correct that currently nothing like this on Jake's blog is possible with the official ipywidgets? https://jakevdp.github.io/blog/2013/12/05/static-interactive-widgets/ |
@michaelaye did you confirm? Also looking for something with the same functionality. |
This looks great guys btw. Looking forward! |
+1 |
1 similar comment
+1 |
https://github.com/jakevdp/ipywidgets-static |
+1 |
How is the feature described in this ticket related/different from the feature to have interactive widgets embedded into static web pages illustrated here? |
The point is not having widgets in the static web page. It is about making them interact with the output (by storing all the possible output combinations in the html file). |
I know @SylvainCorlay is going to write something (post) about this soon, see this comment: #758 (comment) |
@damianavila I will be watching this; I have a reveal.js presentation .html file and would like an interactive slider/plot combination to be usable on my static site as opposed to only while using RISE. |
@SylvainCorlay, can you confirm whether there will soon be static export of ipywidgets? We're at this very moment trying to find a different widget library so that we can switch to it for that feature alone, but if we should be staying with ipywidgets and just need to hold on for a few days longer, please let us know! |
Yes! There is already. For example on http://jupyter.org/widgets, widgets are live. With 6.0 in a few days, widgets will also be embeddable in sphinx documentation. Nbconvert will follow. |
Great, thanks! The live widgets at that link are great, but none of those are for the standard sliders, selection boxes, text entry boxes, etc. that we are using ipywidgets for. Presumably those are also now supported? Nbconvert is indeed my main use case, but we can probably work with Sphinx if that's the only currently supported way. |
All of these are supported. The widgets in that page are built upon We have had static widgets since 5.0. The nbconvert part is the only reason why this issue is not closed yet. |
Yes. We are currently formalizing the spec for the format of the serialized widgets. cf #901 |
With the goal of serialization being to generate and insert that HTML snippet directly, without user cutting and pasting? That does sound crucial for this to be usable in practice, thanks. |
I don't understand your question, but the html snippet feature will remain for those who want to embed in webpages, blogs. The nbconvert question is more about the choice of how the widget state is stored in the notebook format. |
I just mean that nbconvert converts .ipynb to .html, and presumably when one does so one won't need to paste in the HTML snippets that create the widgets, by hand? Basically I just want the widgets to be preserved in the exported file, with the values they had at that time as their starting point, whether or not they are hooked up to anything that actually does something in the exported HTML. E.g. here's an example of a bunch of ipywidgets generated with static PNGs using nbconvert: https://anaconda.org/jbednar/paramnb/notebook But that only works because of the embedded PNGs, whereas embedding the actual widgets would be so much cleaner. Basically I just want to be able to save things as .html and have it all work, insofar as it is possible. Perhaps @philippjfr and @jlstevens could explain better. |
👍 got that. Stay tuned. :) We are currently sprinting to get these things out. |
Fabulous! I'll hand you a drink as you sprint by, if I see you! |
How is the sprint coming? You guys must be winded by now if you've been running flat out for this long! :-) |
That sounds great. Can't wait! |
Indeed, stay tuned for the rtd rendering. |
Widgets are rendering in RTD http://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html |
Wow, nice! Out of curiousity, what is the chosen mechanism for state storage? |
@akhmerov check out the section of the documentation on embedding that got improved at the same time. |
Looks great! |
@michaelaye anything that requires a roundtrip to the backend will not work. However, |
@michaelaye for things that require a kernel, we are thinking of using mybinder as a kernel provider (without the notebook) for embedded widgets. I got some example working but the documentation would probably not be the main purpose. |
We now support widgets rendering on nbviewer Example here: http://nbviewer.jupyter.org/github/ipython/ipywidgets/blob/master/docs/source/examples/Widget%20Events.ipynb This requires the widgets to be generated from the ipywidgets 6.0 (beta) or the current state of master and will be included in the next release. |
Really really glad to close this issue. Support of custom widgets and some css glitches will be worked on before the 6.0. Thank you to everyone involved, especially @minrk @michaelpacer @jasongrout @takluyver @jdfreder. |
@SylvainCorlay Great stuff! Thanks so much for your work on this! One question: in the nbviewer link at the top if I click on the button or hit enter in the submit field nothing happens. Is that expected? Thanks! |
Yes. In these static embeddings, there is no python backend. Only the pure js things will work. We are also working on a kernel-backed thing for full fledges apps. |
Gotcha! One more question: Is it possible to change plots using a radio button or a slider? Similar to http://nbviewer.jupyter.org/github/jakevdp/ipywidgets/blob/master/example.ipynb#Example-4:-Matplotlib-Figures |
You can check www.github.com/Bloomberg/bqplot .. its built for doing things like this
…----- Original Message -----
From: Ino de Bruijn <[email protected]>
To: [email protected]
CC: [email protected]
At: 21-Dec-2016 14:31:52
Gotcha! One more question: Is it possible to change plots using a radio button or a slider? Similar to http://nbviewer.jupyter.org/github/jakevdp/ipywidgets/blob/master/example.ipynb#Example-4:-Matplotlib-Figures
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
* bumped version to force install on rtd * bumped version to force install on rtd, take 2 * added require * fix: for ipywidgets7 * following jupyter-widgets#1629 * fix in import and ipywidgets6 support * following up jupyter-widgets#1630 * missing newline * now using conf.py config values for more flexibility * mention that the extra configuration options are optional * removed print statements
Depends on #13
Originally planned for 3.0, static widgets allow widgets to be exported using nbconvert. The mechanism of state storage has yet to be decided.
The text was updated successfully, but these errors were encountered: