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

Example of standalone app with ipywidgets support #16227

Open
pplonski opened this issue Apr 23, 2024 · 7 comments
Open

Example of standalone app with ipywidgets support #16227

pplonski opened this issue Apr 23, 2024 · 7 comments

Comments

@pplonski
Copy link

Problem

There are available examples of how to use Jupyter components to build apps. However, they do not support ipwyidgets.

Proposed Solution

It would be fantastic if there will be an example of how to reuse Jupyter components to build standalone apps with ipywidgets support. Thank you!

@JasonWeill
Copy link
Contributor

@pplonski Thanks for opening this issue! Can you please share the examples you're referring to about building apps using Jupyter components? Thanks!

@pplonski
Copy link
Author

Thanks @JasonWeill for prompt response. I was referring to examples folder and example apps like examples/app or examples/notebook, it would be fantastic if there will be similar example on how to build your own notebook app with support of ipywidgets.

@JasonWeill JasonWeill added tag:Examples and removed status:Needs Info status:Needs Triage Applied to new issues that need triage labels Apr 24, 2024
@JasonWeill
Copy link
Contributor

@pplonski Got it, thank you for clarifying!

@erkin98
Copy link
Contributor

erkin98 commented Apr 30, 2024

@pplonski what do you mean by with support of ipywidgets?

@pplonski
Copy link
Author

Hi @erkin98,

Right now when you try to run example app (exmaples/notebook) and import ipywidgets and try some widget in the cell, you don't see the widget only text representation .

@jtpio
Copy link
Member

jtpio commented May 1, 2024

One way would be to add the @jupyter-widgets/jupyterlab-manager package to the list of dependencies in that examples/notebook demo app, and require it like the other packages so it's loaded on the page. This way, the widgets manager would be built into the app bundle directly, and should enable the use of widgets.

Another way is to add the bootstrap code that loads federated extensions (like in JupyterLab), which would then pick up the widgets manager from the jupyterlab-widgets Python package directly. There is an example for creating a custom app with federated extensions here: https://github.com/jupyterlab/jupyterlab/tree/main/examples/federated.

@pplonski
Copy link
Author

pplonski commented May 6, 2024

Thank you @jtpio, so it looks like there can be added two new examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants