-
Notifications
You must be signed in to change notification settings - Fork 505
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
Add backward compatibility for ipywidgets 7 #1501
Add backward compatibility for ipywidgets 7 #1501
Conversation
Damn, I did not expect the UI-tests to pass 😆 |
0cd6053
to
0da6a2b
Compare
b177512
to
091b3b7
Compare
This has the downside of not letting the kernel decide the widgets version, which is a regression from Voila 0.4.x. But that should be fine.
for more information, see https://pre-commit.ci
74809a8
to
1530699
Compare
@@ -63,7 +62,7 @@ export function handleExecutionResult({ | |||
}: { | |||
payload: IExecutionResultMessage['payload']; | |||
rendermime: IRenderMimeRegistry; | |||
widgetManager: VoilaWidgetManager; | |||
widgetManager: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this have used the import type
approach too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah indeed I missed that one
my my previous logic was only adding the labextensions that were available in the virtual environment that I wanted to use... now I have refactored to also include the voila extensions... however, there's nothing rendered in my voila page. my federated extensions are: "federated_extensions": [
{
"name": "jupyterlab-plotly",
"load": "static/remoteEntry.41e12212782f05d7d17b.js",
"extension": "./extension",
"mimeExtension": "./mimeExtension",
"entrypoints": None,
},
{
"name": "jupyter-vue",
"load": "static/remoteEntry.f993df579401788f32ef.js",
"extension": "./extension",
"entrypoints": None,
},
{
"name": "jupyter-vuetify",
"load": "static/remoteEntry.cba680c7ed013f0591de.js",
"extension": "./extension",
"entrypoints": None,
},
{
"name": "jupyter-leaflet",
"load": "static/remoteEntry.a83217134ba8dacb85fc.js",
"extension": "./extension",
"entrypoints": None,
},
{
"name": "jupyterlab_pygments",
"load": "static/remoteEntry.5cbb9d2323598fbda535.js",
"extension": "./extension",
"style": "./style",
"entrypoints": None,
},
{
"name": "@jupyter-widgets/jupyterlab-manager",
"load": "static/remoteEntry.e4ff09401a2f575928c0.js",
"extension": "./extension",
"entrypoints": None,
},
{
"name": "@jupyterhub/jupyter-server-proxy",
"load": "static/remoteEntry.569b1096d01998b85e34.js",
"extension": "./extension",
"entrypoints": None,
},
{
"name": "@voila-dashboards/widgets-manager8",
"load": "static/remoteEntry.958dac8c7410b5fcc9ee.js",
"extension": "./extension",
"entrypoints": None,
},
], Is there anything else I've been missing? |
Closes #1487
Closes #1394 as this PR takes the approach of extracting the widget manager package out of the Voila one too.
How?
Voila now ships two new labextensions:
@voila-dashboards/widgets-manager7
for dealing with ipywidgets 7@voila-dashboards/widgets-manager7
for dealing with ipywidgets 8+The server will check which version of
@jupyter-widgets/jupyterlab-manager
is already installed there, and decide to inject either one or the other Voila widget manager in the page.