interactive icon indicating copy to clipboard operation
interactive copied to clipboard

Interactive widgets in Jupyter Notebooks

Open hakonrossebo opened this issue 5 years ago • 12 comments

It would be nice to have some interactivity in notebooks, like taking text input from the user or sliders and checkboxes. Python has this feature with ipywidgets - https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html

IFSharp also seems to have some basic checkbox controls here https://github.com/IvanAntipov/IfSharp.Widgets

For basic text input, the ReadLine() functionality mentioned in dotnet/try#156 would be nice to have.

Are there any attempts to provide this functionality? If not, is there any guidance on how we can create something similar to ipywidgets? I can find some basic examples on how to add javascript and custom html here https://medium.com/@jdchipox/how-to-interact-with-jupyter-33a98686f24e - can that approach work with this kernel?

Here is an article on using widgets in Python notebooks https://medium.com/@jdchipox/how-to-interact-with-jupyter-33a98686f24e

hakonrossebo avatar Nov 27 '19 11:11 hakonrossebo

We are planning on adding support for widgets.

jonsequitur avatar Nov 27 '19 16:11 jonsequitur

+1. Something like ipywidgets or even better, mathematica is a must in my opinion.

manutiedra avatar Feb 16 '20 14:02 manutiedra

Hi @jonsequitur , I've forgotten, what's the status on widget support? Anywhere to look or help?

I remember we discussed some aspects in a 1:1 but I can't track down my notes on this.

Thanks!

dsyme avatar Jul 14 '20 16:07 dsyme

hi. just to check - is there any progress, documentation or pointers on this one? actually we are planning to integrate interactive with 3D visualizations - i think the same mechanisms would be needed here. :)

haraldsteinlechner avatar Oct 28 '20 17:10 haraldsteinlechner

FYI: check if this discussion relevant for 3D scientific visualization for dotnet Interactive.

GeorgeS2019 avatar Sep 13 '21 14:09 GeorgeS2019

With the additional functionality in #!connect recently added(Ref: #2791), I just gave a widget a whirl (specifically https://github.com/microsoft/powerbi-jupyter). As expected, widgets aren't solved with the update. Still the additional of cross kernel connect is a great addition.

Snozzberries avatar Jun 01 '23 01:06 Snozzberries

@Snozzberries Is it possible for your to share e.g. gif screen video of what you mean with your polyglot notebook?

Additional reference

GeorgeS2019 avatar Jun 03 '23 03:06 GeorgeS2019

Prereqs:

#Enable Extensions
pip install powerbiclient
jupyter labextension install @jupyter-widgets/jupyterlab-manager
#Refresh browser

Here is a quick overview. The cells that I preloaded were just the device code authN flows and cleared those cells before recording.

crash

Snozzberries avatar Jun 05 '23 16:06 Snozzberries

Some stand-alone notebooks have been created by @powelstadnicki uses a custom handler for messages from Javascript back to the kernel

funkrider avatar Jun 10 '23 16:06 funkrider

Some stand-alone notebooks have been created by @powelstadnicki uses a custom handler for messages from Javascript back to the kernel

@funkrider I looked for this guy on github, google, and twitter, and haven't been able to find anything from him. Do you have a link. I would love to see this in action

shiftybit avatar Jan 20 '24 15:01 shiftybit

https://www.buymeacoffee.com/florencedev/posts

funkrider avatar Jan 20 '24 16:01 funkrider

https://pawestadnicki.medium.com/master-net-interactive-with-f-7553adf61350

funkrider avatar Jan 20 '24 16:01 funkrider