Skip to content
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

Closed
jdfreder opened this issue May 5, 2015 · 42 comments · Fixed by #985
Closed

Static widgets #16

jdfreder opened this issue May 5, 2015 · 42 comments · Fixed by #985
Assignees
Labels
proposal resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone

Comments

@jdfreder
Copy link
Contributor

jdfreder commented May 5, 2015

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.

@jdfreder jdfreder modified the milestones: 4.0, 5.0 May 5, 2015
@stsievert
Copy link

+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.

@TMorville
Copy link

+1. Using Nbconvert or Nbviewer with widgets would be neat feature for teaching people without access to ipython/jupyter.

@michaelaye
Copy link

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/

@bcordo
Copy link

bcordo commented Apr 20, 2016

@michaelaye did you confirm? Also looking for something with the same functionality.

@bcordo
Copy link

bcordo commented Apr 20, 2016

This looks great guys btw. Looking forward!

@kulla
Copy link

kulla commented Jun 1, 2016

+1

1 similar comment
@desilinguist
Copy link

+1

@georgebv
Copy link

https://github.com/jakevdp/ipywidgets-static
The problem is solved here, though native widgets look much batter. Is anyone working on this right now?

@dh-nunes
Copy link

@georgebv You can tell from his own example that it no longer works. Would absolutely love to see this feature though!

@sripakpa
Copy link

+1

@sripakpa
Copy link

How is the feature described in this ticket related/different from the feature to have interactive widgets embedded into static web pages illustrated here?

@georgebv
Copy link

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).

@damianavila
Copy link
Contributor

I know @SylvainCorlay is going to write something (post) about this soon, see this comment: #758 (comment)

@rtbs-dev
Copy link

rtbs-dev commented Sep 26, 2016

@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.

@jbednar
Copy link

jbednar commented Nov 15, 2016

@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!

@SylvainCorlay
Copy link
Member

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.

@jbednar
Copy link

jbednar commented Nov 15, 2016

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.

@SylvainCorlay
Copy link
Member

All of these are supported. The widgets in that page are built upon ipywidgets. I will add a tab with some simple dropdowns and buttons.

We have had static widgets since 5.0. The nbconvert part is the only reason why this issue is not closed yet.

@SylvainCorlay
Copy link
Member

Yes. We are currently formalizing the spec for the format of the serialized widgets. cf #901

@jbednar
Copy link

jbednar commented Nov 15, 2016

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.

@SylvainCorlay
Copy link
Member

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.

@jbednar
Copy link

jbednar commented Nov 15, 2016

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.

@SylvainCorlay
Copy link
Member

SylvainCorlay commented Nov 15, 2016

👍 got that. Stay tuned. :) We are currently sprinting to get these things out.

@jbednar
Copy link

jbednar commented Nov 15, 2016

Fabulous! I'll hand you a drink as you sprint by, if I see you!

@jbednar
Copy link

jbednar commented Dec 8, 2016

How is the sprint coming? You guys must be winded by now if you've been running flat out for this long! :-)

@SylvainCorlay
Copy link
Member

@jbednar

  • we have working static widgets in sphinx docs

    nbsphinx-screencast

    which is only waiting for the PR to get merged in another repo.

  • All the pieces are completed for nbviewer except an outstanding PR in nbconvert.

@jbednar
Copy link

jbednar commented Dec 9, 2016

That sounds great. Can't wait!

@michaelaye
Copy link

Very nice. Just a quickie: i assume the readthedocs version is not yet working because of some final tweaks or am I maybe missing a plugin (using Safari on 10.11.6)?
screenshot 2016-12-09 10 20 59

@SylvainCorlay
Copy link
Member

Indeed, stay tuned for the rtd rendering.

@SylvainCorlay
Copy link
Member

@akhmerov
Copy link
Contributor

Wow, nice! Out of curiousity, what is the chosen mechanism for state storage?

@SylvainCorlay
Copy link
Member

@akhmerov check out the section of the documentation on embedding that got improved at the same time.

http://ipywidgets.readthedocs.io/en/latest/embedding.html

@michaelaye
Copy link

michaelaye commented Dec 11, 2016

Looks great!
But: The linked widgets are not linked in RTD:
http://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Basics.html#Linking-two-similar-widgets
Want a new GH issue for that?

@SylvainCorlay
Copy link
Member

@michaelaye anything that requires a roundtrip to the backend will not work.

However, jslink and jsdlink do work on RTD.

@SylvainCorlay
Copy link
Member

SylvainCorlay commented Dec 11, 2016

@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.

@SylvainCorlay
Copy link
Member

SylvainCorlay commented Dec 14, 2016

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.

@SylvainCorlay
Copy link
Member

SylvainCorlay commented Dec 14, 2016

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.

@inodb
Copy link

inodb commented Dec 21, 2016

@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!

@SylvainCorlay
Copy link
Member

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.

@inodb
Copy link

inodb commented Dec 21, 2016

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

@dmadeka
Copy link
Contributor

dmadeka commented Dec 21, 2016 via email

basnijholt pushed a commit to basnijholt/ipywidgets that referenced this issue Mar 27, 2019
* 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
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
proposal resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.