dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.84k stars 382 forks source link

Interactive widgets in Jupyter Notebooks #35

Open hakonrossebo opened 4 years ago

hakonrossebo commented 4 years ago

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

jonsequitur commented 4 years ago

We are planning on adding support for widgets.

manutiedra commented 4 years ago

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

dsyme commented 4 years ago

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!

haraldsteinlechner commented 3 years ago

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

GeorgeS2019 commented 2 years ago

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

Snozzberries commented 1 year ago

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.

GeorgeS2019 commented 1 year ago

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

Additional reference

Snozzberries commented 1 year ago

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

funkrider commented 1 year ago

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

shiftybit commented 7 months ago

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

funkrider commented 7 months ago

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

funkrider commented 7 months ago

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