Skip to content

Commit 82f4a6c

Browse files
authored
Update to ipywidgets 8 (#119)
* Update to ipywidgets 8 * Fix tests
1 parent af675eb commit 82f4a6c

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Install dependencies
3131
run: |
32-
python -m pip install -U cookiecutter jupyterlab~=3.0
32+
python -m pip install -U cookiecutter jupyterlab~=3.0 ipywidgets
3333
3434
- name: Install the extension
3535
run: |

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ notebook / lab frontend. For lab, this is done by the command:
6565

6666
```
6767
jupyter labextension develop --overwrite .
68-
yarn run build
6968
```
7069

7170
For classic notebook, you can run:
@@ -80,6 +79,11 @@ the `install` command every time that you rebuild your extension. For certain in
8079
you might also need another flag instead of `--sys-prefix`, but we won't cover the meaning
8180
of those flags here.
8281

82+
Every time you make a change in the TypeScript code, you will need to rebuild it then refresh the browser page:
83+
84+
```
85+
yarn run build
86+
```
8387

8488
### How to see your changes
8589
#### Typescript:

{{cookiecutter.github_project_name}}/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ $RECYCLE.BIN/
146146

147147
**/node_modules/
148148
{{ cookiecutter.python_package_name }}/nbextension/index.*
149-
{{ cookiecutter.python_package_name }}/labextension/*.tgz
150149

151150
# Coverage data
152151
# -------------

{{cookiecutter.github_project_name}}/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@
4949
"watch:labextension": "jupyter labextension watch ."
5050
},
5151
"dependencies": {
52-
"@jupyter-widgets/base": "^1.1.10 || ^2.0.0 || ^3.0.0 || ^4.0.0"
52+
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6"
5353
},
5454
"devDependencies": {
5555
"@babel/core": "^7.5.0",
5656
"@babel/preset-env": "^7.5.0",
57+
"@jupyter-widgets/base-manager": "^1.0.2",
5758
"@jupyterlab/builder": "^3.0.0",
58-
"@phosphor/application": "^1.6.0",
59-
"@phosphor/widgets": "^1.6.0",
59+
"@lumino/application": "^1.6.0",
60+
"@lumino/widgets": "^1.6.0",
6061
"@types/jest": "^26.0.0",
6162
"@types/webpack-env": "^1.13.6",
6263
"@typescript-eslint/eslint-plugin": "^3.6.0",

{{cookiecutter.github_project_name}}/src/__tests__/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Distributed under the terms of the Modified BSD License.
33

44
import * as widgets from '@jupyter-widgets/base';
5+
import * as baseManager from '@jupyter-widgets/base-manager';
56
import * as services from '@jupyterlab/services';
67

78
let numComms = 0;
@@ -44,7 +45,7 @@ export class MockComm implements widgets.IClassicComm {
4445
_on_close: ((x?: any) => void) | null = null;
4546
}
4647

47-
export class DummyManager extends widgets.ManagerBase<HTMLElement> {
48+
export class DummyManager extends baseManager.ManagerBase {
4849
constructor() {
4950
super();
5051
this.el = window.document.createElement('div');

{{cookiecutter.github_project_name}}/src/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Copyright (c) {{ cookiecutter.author_name }}
22
// Distributed under the terms of the Modified BSD License.
33

4-
import { Application, IPlugin } from '@phosphor/application';
4+
import { Application, IPlugin } from '@lumino/application';
55

6-
import { Widget } from '@phosphor/widgets';
6+
import { Widget } from '@lumino/widgets';
77

88
import { IJupyterWidgetRegistry } from '@jupyter-widgets/base';
99

0 commit comments

Comments
 (0)