Conversation
Signed-off-by: Andrew Stein <steinlink@gmail.com> # Conflicts: # packages/jupyterlab/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR replaces the dual-package
ipywidgets+ JupyterLab labextension architecture forPerspectiveWidgetwith a single AnyWidget-based widget shipped entirely from theperspective-pythonwheel. The widget now runs identically in JupyterLab, classic Jupyter Notebook, VSCode notebooks, Colab, Marimo, etc. — with no per-host labextension install.@perspective-dev/jupyterlabis retained, but slimmed down to a renderers-only labextension (the CSV/JSON/Arrow "Open With → Perspective" file viewers); it no longer ships the widget (and is optional to install if you do not want this feature).@perspective-dev/anywidget, a single esbuild step bundles@perspective-dev/{client,server,viewer,viewer-datagrid,viewer-charts}(wasm inlined) intoperspective-anywidget.{js,css}, emitted directly into the Python package atrust/perspective-python/perspective/widget/static/.PerspectiveWidget(anywidget.AnyWidget, PerspectiveViewer)with_esm = static/perspective-anywidget.jsand_css = static/perspective-anywidget.css; all_model_*/_view_*traitlets removed.anywidgetadded to the[jupyter]optional dependency and torequirements.txt;[tool.maturin].includeships the bundle; dropped the deadperspective/extensioninclude andfinos-perspective-nbextension.json.model.js,view.js,widget.js,psp_widget.js,plugin.js,notebook/*,version.js,webpack.config.js, and the resize test/fixture.index.jsnow registers onlyPerspectiveRenderers;renderer.jslazy-loads the runtime from@perspective-dev/anywidgeton first file-open.viewer-charts,viewer-datagrid, and the viewer'scustom_element.rsbootstrapnow skip andconsole.warninstead of throwing when a custom element is already defined. This lets the widget bundle and the renderers labextension (two copies of the runtime) coexist on one page without"… has already been used with this registry"crashes. You should never do this in practice, however the design of Jupyter's ecosystem makes this difficult to avoid.Fixes #2783
Fixes #3042
Fixes #3056