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

Publish graph_notebook_widgets JS assets to npm #537

Open
tkrabel-db opened this issue Oct 30, 2023 · 5 comments
Open

Publish graph_notebook_widgets JS assets to npm #537

tkrabel-db opened this issue Oct 30, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@tkrabel-db
Copy link

Community Note

  • Please use a 👍 reaction to provide a +1/vote. This helps the community and maintainers prioritize this request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Is your feature request related to a problem? Please describe.
Disclaimer: I work for Databricks.

Databricks supports ipywidgets like Jupyter Notebook and Lab does, but for security reasons, our notebooks run widgets in sandboxed iframes that fetch widgets JS assets from public CDNs like npm. Some of our customers would like to use your library inside Databricks notebooks, but can't because you are not npm publishing your JS assets.

As a side benefit: if you publish your assets, graph notebook widgets also work on voila! :)

Describe the solution you'd like
The solution is pretty straightforward. You already create the JS distribution bundle here /dist. All you'd need to do is publish that by running npm publish. You could add that rule here.

@tkrabel-db tkrabel-db added the enhancement New feature or request label Oct 30, 2023
@jasongrout
Copy link

Ping @ellisonbg and @JasonWeill, who may be able to provide some context from within AWS.

Essentially, publishing the widget js assets to npm allows them to be used in systems that pull js from CDN. Voila does (did?) this, etc. I'm happy to help figure out what changes would need to happen to publish your built packages on npm.

Disclaimer: I work with @tkrabel-db at Databricks, particularly on ipywidget support. We'd love to support this widget, but we do pull the js for widgets from CDN.

@michaelnchin
Copy link
Member

Hi @tkrabel-db and @jasongrout, thank you for the enhancement request!

At one point, we investigated NPM publishing the graph_notebook_widgets extension as part of our efforts to implement JupyterLab support. However, with the arrival of prebuilt extension support in JupyterLab 3, it was no longer critical to make the widgets JS package available to install as a source extension, and we ended up putting this task on the backburner.

The use case described in regards to compatibility with your customers' Databricks Notebooks seems like a reasonable justification for resurrecting this task. We'll look into assessing the remaining internal effort required for publishing graph_notebook_widgets separately via NPM.

@jasongrout-db
Copy link

IIRC, both colab and vs code may also pull the widget js from cdn - I think it's a pretty common pattern for tools that put ipywidgets in an iframe for security.

@tkrabel-db
Copy link
Author

@michaelnchin are there any updates on this issue?

@michaelnchin
Copy link
Member

We are currently targeting EOY for completion of internal approvals and deployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: High priority
Development

No branches or pull requests

4 participants