Skip to content

Commit

Permalink
feat: support for ipywidgets 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mariobuikhuizen committed Dec 16, 2021
1 parent 9a1ea09 commit f3420ea
Show file tree
Hide file tree
Showing 3 changed files with 309 additions and 66 deletions.
6 changes: 3 additions & 3 deletions packages/voila/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"main": "lib/index.js",
"browserslist": ">0.8%, not ie 11, not op_mini all, not dead",
"dependencies": {
"@jupyter-widgets/base": "^4.0.0",
"@jupyter-widgets/controls": "^3.0.0",
"@jupyter-widgets/jupyterlab-manager": "^3.0.0",
"@jupyter-widgets/base": "^5.0.0-beta.0",
"@jupyter-widgets/controls": "^4.0.0-beta.0",
"@jupyter-widgets/jupyterlab-manager": "^4.0.0-beta.0",
"@jupyterlab/application": "^3.0.0",
"@jupyterlab/apputils": "^3.0.0",
"@jupyterlab/coreutils": "^5.0.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/voila/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ export class WidgetManager extends JupyterLabManager {
const model = models[model_id];
const widgetel = document.createElement('div');
viewtag.parentElement.insertBefore(widgetel, viewtag);
const view = await this.create_view(model);
// TODO: fix typing
await this.display_model(undefined as any, model, {
await this.display_view(undefined as any, view, {
el: widgetel
});
} catch (error) {
Expand All @@ -128,7 +129,7 @@ export class WidgetManager extends JupyterLabManager {

async display_view(msg: any, view: any, options: any): Promise<Widget> {
if (options.el) {
LuminoWidget.Widget.attach(view.pWidget, options.el);
LuminoWidget.Widget.attach(view.luminoWidget, options.el);
}
if (view.el) {
view.el.setAttribute('data-voila-jupyter-widget', '');
Expand Down
Loading

0 comments on commit f3420ea

Please sign in to comment.