Skip to content

Commit

Permalink
feat: support for ipywidgets 8 (#1046)
Browse files Browse the repository at this point in the history
* feat: support for ipywidgets 8

* Update to `@jupyter-widgets` 8 final packages

* yarn deduplicate

* Bump `ipympl` test dependency

* Update reference snapshots

* Install `ipyvolume` from the branch

* Update ipyvolume snapshot

* Update ipyvolume snapshot

Co-authored-by: Jeremy Tuloup <jeremy.tuloup@gmail.com>
  • Loading branch information
mariobuikhuizen and jtpio committed Sep 21, 2022
1 parent b588c06 commit 5dcdb80
Show file tree
Hide file tree
Showing 11 changed files with 524 additions and 509 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.1.0",
"@jupyter-widgets/controls": "^3.1.0",
"@jupyter-widgets/jupyterlab-manager": "^3.1.0",
"@jupyter-widgets/base": "^6.0.1",
"@jupyter-widgets/controls": "^5.0.1",
"@jupyter-widgets/jupyterlab-manager": "^5.0.3",
"@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 @@ -111,8 +111,9 @@ export class WidgetManager extends JupyterLabManager {
const model = await this.get_model(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 @@ -131,7 +132,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
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ visual_test =
jupyterlab~=3.0
bqplot
scipy
ipympl==0.8.7
ipyvolume
ipympl==0.9.2
ipyvolume @ git+https://github.com/jtpio/ipyvolume@ipywidgets-8
jupyterlab_miami_nights==0.3.2

[options.entry_points]
Expand Down
Binary file modified ui-tests/tests/voila.test.ts-snapshots/basics-dark-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/voila.test.ts-snapshots/basics-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/voila.test.ts-snapshots/basics-miami-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/voila.test.ts-snapshots/gridspecLayout-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/voila.test.ts-snapshots/interactive-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/voila.test.ts-snapshots/ipyvolume-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ui-tests/tests/voila.test.ts-snapshots/reveal-linux.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5dcdb80

Please sign in to comment.