Merge pull request #6539 from afshin/lumino-2

Update to Lumino 2 and JupyterLab 4.0.0a29
Jeremy Tuloup 3 years ago committed by GitHub
commit acbec17fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,7 @@ runs:
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=4.0.0a25,<5" ypy-websocket==0.2 build
python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=4.0.0a29,<5" build
- name: Build pypi distributions
shell: bash

@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U "jupyterlab>=4.0.0a25,<5" ypy-websocket==0.2 hatch
python -m pip install -U "jupyterlab>=4.0.0a29,<5" hatch
jlpm
jlpm run build
@ -76,6 +76,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U "jupyterlab>=4.0.0a25,<5" ypy-websocket==0.2 pip
python -m pip install -U "jupyterlab>=4.0.0a29,<5" pip
jlpm
jlpm run build

@ -24,7 +24,7 @@ jobs:
ui-tests:
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 20
strategy:
fail-fast: false
matrix:

@ -127,6 +127,7 @@ async function main() {
require('@jupyterlab/fileeditor-extension').default.filter(({ id }) =>
['@jupyterlab/fileeditor-extension:plugin'].includes(id)
),
require('@jupyterlab/lsp-extension'),
require('@jupyterlab/mainmenu-extension'),
require('@jupyterlab/markedparser-extension'),
require('@jupyterlab/mathjax2-extension'),
@ -147,7 +148,7 @@ async function main() {
require('@jupyterlab/theme-dark-extension'),
require('@jupyterlab/translation-extension'),
// Add the "Hub Control Panel" menu option when running in JupyterHub
require('@jupyterlab/user-extension'),
require('@jupyterlab/collaboration-extension'),
require('@jupyterlab/hub-extension')
];

@ -22,79 +22,81 @@
"@jupyter-notebook/tree": "~7.0.0-alpha.5",
"@jupyter-notebook/tree-extension": "~7.0.0-alpha.5",
"@jupyter-notebook/ui-components": "~7.0.0-alpha.5",
"@jupyterlab/application": "~4.0.0-alpha.10",
"@jupyterlab/application-extension": "~4.0.0-alpha.10",
"@jupyterlab/apputils": "~4.0.0-alpha.10",
"@jupyterlab/apputils-extension": "~4.0.0-alpha.10",
"@jupyterlab/cell-toolbar": "~4.0.0-alpha.10",
"@jupyterlab/cell-toolbar-extension": "~4.0.0-alpha.10",
"@jupyterlab/celltags": "~4.0.0-alpha.10",
"@jupyterlab/codeeditor": "~4.0.0-alpha.10",
"@jupyterlab/codemirror-extension": "~4.0.0-alpha.10",
"@jupyterlab/completer": "~4.0.0-alpha.10",
"@jupyterlab/completer-extension": "~4.0.0-alpha.10",
"@jupyterlab/console": "~4.0.0-alpha.10",
"@jupyterlab/console-extension": "~4.0.0-alpha.10",
"@jupyterlab/coreutils": "~6.0.0-alpha.10",
"@jupyterlab/docmanager": "~4.0.0-alpha.10",
"@jupyterlab/docmanager-extension": "~4.0.0-alpha.10",
"@jupyterlab/docprovider": "~4.0.0-alpha.10",
"@jupyterlab/docprovider-extension": "~4.0.0-alpha.10",
"@jupyterlab/documentsearch": "~4.0.0-alpha.10",
"@jupyterlab/documentsearch-extension": "~4.0.0-alpha.10",
"@jupyterlab/filebrowser": "~4.0.0-alpha.10",
"@jupyterlab/filebrowser-extension": "~4.0.0-alpha.10",
"@jupyterlab/fileeditor": "~4.0.0-alpha.10",
"@jupyterlab/fileeditor-extension": "~4.0.0-alpha.10",
"@jupyterlab/hub-extension": "~4.0.0-alpha.10",
"@jupyterlab/javascript-extension": "~4.0.0-alpha.10",
"@jupyterlab/json-extension": "~4.0.0-alpha.10",
"@jupyterlab/mainmenu": "~4.0.0-alpha.10",
"@jupyterlab/mainmenu-extension": "~4.0.0-alpha.10",
"@jupyterlab/markedparser-extension": "~4.0.0-alpha.10",
"@jupyterlab/mathjax2-extension": "~4.0.0-alpha.10",
"@jupyterlab/notebook": "~4.0.0-alpha.10",
"@jupyterlab/notebook-extension": "~4.0.0-alpha.10",
"@jupyterlab/observables": "~5.0.0-alpha.10",
"@jupyterlab/outputarea": "~4.0.0-alpha.10",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.10",
"@jupyterlab/rendermime": "~4.0.0-alpha.10",
"@jupyterlab/rendermime-extension": "~4.0.0-alpha.10",
"@jupyterlab/rendermime-interfaces": "~3.8.0-alpha.10",
"@jupyterlab/running-extension": "~4.0.0-alpha.10",
"@jupyterlab/services": "~7.0.0-alpha.10",
"@jupyterlab/settingregistry": "~4.0.0-alpha.10",
"@jupyterlab/shared-models": "~4.0.0-alpha.10",
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.10",
"@jupyterlab/statedb": "~4.0.0-alpha.10",
"@jupyterlab/statusbar": "~4.0.0-alpha.10",
"@jupyterlab/terminal": "~4.0.0-alpha.10",
"@jupyterlab/terminal-extension": "~4.0.0-alpha.10",
"@jupyterlab/theme-dark-extension": "~4.0.0-alpha.10",
"@jupyterlab/theme-light-extension": "~4.0.0-alpha.10",
"@jupyterlab/tooltip": "~4.0.0-alpha.10",
"@jupyterlab/tooltip-extension": "~4.0.0-alpha.10",
"@jupyterlab/translation": "~4.0.0-alpha.10",
"@jupyterlab/translation-extension": "~4.0.0-alpha.10",
"@jupyterlab/ui-components": "~4.0.0-alpha.25",
"@jupyterlab/user": "~4.0.0-alpha.10",
"@jupyterlab/user-extension": "~4.0.0-alpha.10",
"@jupyterlab/vega5-extension": "~4.0.0-alpha.10",
"@lumino/algorithm": "~1.9.1",
"@lumino/application": "~1.29.0",
"@lumino/commands": "~1.20.0",
"@lumino/coreutils": "~1.12.0",
"@lumino/disposable": "~1.10.1",
"@lumino/domutils": "~1.8.1",
"@lumino/dragdrop": "~1.14.0",
"@lumino/messaging": "~1.10.1",
"@lumino/properties": "~1.8.1",
"@lumino/signaling": "~1.10.1",
"@lumino/virtualdom": "~1.14.1",
"@lumino/widgets": "~1.32.0",
"@jupyterlab/application": "~4.0.0-alpha.14",
"@jupyterlab/application-extension": "~4.0.0-alpha.14",
"@jupyterlab/apputils": "~4.0.0-alpha.14",
"@jupyterlab/apputils-extension": "~4.0.0-alpha.14",
"@jupyterlab/cell-toolbar": "~4.0.0-alpha.14",
"@jupyterlab/cell-toolbar-extension": "~4.0.0-alpha.14",
"@jupyterlab/celltags": "~4.0.0-alpha.14",
"@jupyterlab/codeeditor": "~4.0.0-alpha.14",
"@jupyterlab/codemirror-extension": "~4.0.0-alpha.14",
"@jupyterlab/collaboration": "~4.0.0-alpha.14",
"@jupyterlab/collaboration-extension": "~4.0.0-alpha.14",
"@jupyterlab/completer": "~4.0.0-alpha.14",
"@jupyterlab/completer-extension": "~4.0.0-alpha.14",
"@jupyterlab/console": "~4.0.0-alpha.14",
"@jupyterlab/console-extension": "~4.0.0-alpha.14",
"@jupyterlab/coreutils": "~6.0.0-alpha.14",
"@jupyterlab/docmanager": "~4.0.0-alpha.14",
"@jupyterlab/docmanager-extension": "~4.0.0-alpha.14",
"@jupyterlab/docprovider": "~4.0.0-alpha.14",
"@jupyterlab/docprovider-extension": "~4.0.0-alpha.14",
"@jupyterlab/documentsearch": "~4.0.0-alpha.14",
"@jupyterlab/documentsearch-extension": "~4.0.0-alpha.14",
"@jupyterlab/filebrowser": "~4.0.0-alpha.14",
"@jupyterlab/filebrowser-extension": "~4.0.0-alpha.14",
"@jupyterlab/fileeditor": "~4.0.0-alpha.14",
"@jupyterlab/fileeditor-extension": "~4.0.0-alpha.14",
"@jupyterlab/hub-extension": "~4.0.0-alpha.14",
"@jupyterlab/javascript-extension": "~4.0.0-alpha.14",
"@jupyterlab/json-extension": "~4.0.0-alpha.14",
"@jupyterlab/lsp": "~4.0.0-alpha.14",
"@jupyterlab/lsp-extension": "~4.0.0-alpha.14",
"@jupyterlab/mainmenu": "~4.0.0-alpha.14",
"@jupyterlab/mainmenu-extension": "~4.0.0-alpha.14",
"@jupyterlab/markedparser-extension": "~4.0.0-alpha.14",
"@jupyterlab/mathjax2-extension": "~4.0.0-alpha.14",
"@jupyterlab/notebook": "~4.0.0-alpha.14",
"@jupyterlab/notebook-extension": "~4.0.0-alpha.14",
"@jupyterlab/observables": "~5.0.0-alpha.14",
"@jupyterlab/outputarea": "~4.0.0-alpha.14",
"@jupyterlab/pdf-extension": "~4.0.0-alpha.14",
"@jupyterlab/rendermime": "~4.0.0-alpha.14",
"@jupyterlab/rendermime-extension": "~4.0.0-alpha.14",
"@jupyterlab/rendermime-interfaces": "~3.8.0-alpha.14",
"@jupyterlab/running-extension": "~4.0.0-alpha.14",
"@jupyterlab/services": "~7.0.0-alpha.14",
"@jupyterlab/settingregistry": "~4.0.0-alpha.14",
"@jupyterlab/shared-models": "~4.0.0-alpha.14",
"@jupyterlab/shortcuts-extension": "~4.0.0-alpha.14",
"@jupyterlab/statedb": "~4.0.0-alpha.14",
"@jupyterlab/statusbar": "~4.0.0-alpha.14",
"@jupyterlab/terminal": "~4.0.0-alpha.14",
"@jupyterlab/terminal-extension": "~4.0.0-alpha.14",
"@jupyterlab/theme-dark-extension": "~4.0.0-alpha.14",
"@jupyterlab/theme-light-extension": "~4.0.0-alpha.14",
"@jupyterlab/tooltip": "~4.0.0-alpha.14",
"@jupyterlab/tooltip-extension": "~4.0.0-alpha.14",
"@jupyterlab/translation": "~4.0.0-alpha.14",
"@jupyterlab/translation-extension": "~4.0.0-alpha.14",
"@jupyterlab/ui-components": "~4.0.0-alpha.29",
"@jupyterlab/vega5-extension": "~4.0.0-alpha.14",
"@lumino/algorithm": "~2.0.0-alpha.6",
"@lumino/application": "~2.0.0-alpha.6",
"@lumino/commands": "~2.0.0-alpha.6",
"@lumino/coreutils": "~2.0.0-alpha.6",
"@lumino/disposable": "~2.0.0-alpha.6",
"@lumino/domutils": "~2.0.0-alpha.6",
"@lumino/dragdrop": "~2.0.0-alpha.6",
"@lumino/messaging": "~2.0.0-alpha.6",
"@lumino/properties": "~2.0.0-alpha.6",
"@lumino/signaling": "~2.0.0-alpha.6",
"@lumino/virtualdom": "~2.0.0-alpha.6",
"@lumino/widgets": "~2.0.0-alpha.6",
"react": "~17.0.2",
"react-dom": "~17.0.2",
"yjs": "~13.5.38"
"yjs": "~13.5.41"
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.5",
@ -108,48 +110,50 @@
"@jupyter-notebook/tree": "^7.0.0-alpha.5",
"@jupyter-notebook/tree-extension": "^7.0.0-alpha.5",
"@jupyter-notebook/ui-components": "^7.0.0-alpha.5",
"@jupyterlab/application-extension": "^4.0.0-alpha.10",
"@jupyterlab/apputils-extension": "^4.0.0-alpha.10",
"@jupyterlab/cell-toolbar-extension": "^4.0.0-alpha.10",
"@jupyterlab/celltags": "^4.0.0-alpha.10",
"@jupyterlab/codemirror-extension": "^4.0.0-alpha.10",
"@jupyterlab/completer-extension": "^4.0.0-alpha.10",
"@jupyterlab/console-extension": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "~6.0.0-alpha.10",
"@jupyterlab/docmanager-extension": "^4.0.0-alpha.10",
"@jupyterlab/docprovider-extension": "^4.0.0-alpha.10",
"@jupyterlab/documentsearch-extension": "^4.0.0-alpha.10",
"@jupyterlab/filebrowser-extension": "^4.0.0-alpha.10",
"@jupyterlab/fileeditor-extension": "^4.0.0-alpha.10",
"@jupyterlab/hub-extension": "^4.0.0-alpha.10",
"@jupyterlab/javascript-extension": "^4.0.0-alpha.10",
"@jupyterlab/json-extension": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu-extension": "^4.0.0-alpha.10",
"@jupyterlab/markedparser-extension": "^4.0.0-alpha.10",
"@jupyterlab/mathjax2-extension": "^4.0.0-alpha.10",
"@jupyterlab/notebook-extension": "^4.0.0-alpha.10",
"@jupyterlab/pdf-extension": "^4.0.0-alpha.10",
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.10",
"@jupyterlab/running-extension": "^4.0.0-alpha.10",
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.10",
"@jupyterlab/terminal-extension": "^4.0.0-alpha.10",
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.10",
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.10",
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.10",
"@jupyterlab/translation-extension": "^4.0.0-alpha.10",
"@jupyterlab/user-extension": "^4.0.0-alpha.10",
"@jupyterlab/vega5-extension": "^4.0.0-alpha.10"
"@jupyterlab/application-extension": "^4.0.0-alpha.14",
"@jupyterlab/apputils-extension": "^4.0.0-alpha.14",
"@jupyterlab/cell-toolbar-extension": "^4.0.0-alpha.14",
"@jupyterlab/celltags": "^4.0.0-alpha.14",
"@jupyterlab/codemirror-extension": "^4.0.0-alpha.14",
"@jupyterlab/collaboration-extension": "^4.0.0-alpha.14",
"@jupyterlab/completer-extension": "^4.0.0-alpha.14",
"@jupyterlab/console-extension": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/docmanager-extension": "^4.0.0-alpha.14",
"@jupyterlab/docprovider-extension": "^4.0.0-alpha.14",
"@jupyterlab/documentsearch-extension": "^4.0.0-alpha.14",
"@jupyterlab/filebrowser-extension": "^4.0.0-alpha.14",
"@jupyterlab/fileeditor-extension": "^4.0.0-alpha.14",
"@jupyterlab/hub-extension": "^4.0.0-alpha.14",
"@jupyterlab/javascript-extension": "^4.0.0-alpha.14",
"@jupyterlab/json-extension": "^4.0.0-alpha.14",
"@jupyterlab/lsp": "^4.0.0-alpha.14",
"@jupyterlab/lsp-extension": "^4.0.0-alpha.14",
"@jupyterlab/mainmenu-extension": "^4.0.0-alpha.14",
"@jupyterlab/markedparser-extension": "^4.0.0-alpha.14",
"@jupyterlab/mathjax2-extension": "^4.0.0-alpha.14",
"@jupyterlab/notebook-extension": "^4.0.0-alpha.14",
"@jupyterlab/pdf-extension": "^4.0.0-alpha.14",
"@jupyterlab/rendermime-extension": "^4.0.0-alpha.14",
"@jupyterlab/running-extension": "^4.0.0-alpha.14",
"@jupyterlab/shortcuts-extension": "^4.0.0-alpha.14",
"@jupyterlab/terminal-extension": "^4.0.0-alpha.14",
"@jupyterlab/theme-dark-extension": "^4.0.0-alpha.14",
"@jupyterlab/theme-light-extension": "^4.0.0-alpha.14",
"@jupyterlab/tooltip-extension": "^4.0.0-alpha.14",
"@jupyterlab/translation-extension": "^4.0.0-alpha.14",
"@jupyterlab/vega5-extension": "^4.0.0-alpha.14"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-alpha.10",
"@jupyterlab/buildutils": "^4.0.0-alpha.10",
"@types/rimraf": "^3.0.0",
"@jupyterlab/builder": "^4.0.0-alpha.14",
"@jupyterlab/buildutils": "^4.0.0-alpha.14",
"@types/rimraf": "^3.0.2",
"css-loader": "~5.0.1",
"fs-extra": "^8.1.0",
"glob": "~7.1.6",
"mini-css-extract-plugin": "~0.9.0",
"npm-run-all": "^4.1.5",
"rimraf": "~3.0.2",
"rimraf": "^3.0.2",
"style-loader": "~1.0.1",
"svg-url-loader": "~6.0.0",
"watch": "~1.0.2",
@ -163,6 +167,7 @@
"name": "Jupyter Notebook",
"extensions": [
"@jupyter-notebook/application-extension",
"@jupyterlab/collaboration-extension",
"@jupyter-notebook/console-extension",
"@jupyter-notebook/docmanager-extension",
"@jupyter-notebook/documentsearch-extension",
@ -181,6 +186,7 @@
"@jupyterlab/filebrowser-extension",
"@jupyterlab/fileeditor-extension",
"@jupyterlab/hub-extension",
"@jupyterlab/lsp-extension",
"@jupyterlab/mainmenu-extension",
"@jupyterlab/mathjax2-extension",
"@jupyterlab/markedparser-extension",
@ -192,8 +198,7 @@
"@jupyterlab/theme-dark-extension",
"@jupyterlab/theme-light-extension",
"@jupyterlab/tooltip-extension",
"@jupyterlab/translation-extension",
"@jupyterlab/user-extension"
"@jupyterlab/translation-extension"
],
"singletonPackages": [
"@jupyter-notebook/tree",
@ -202,6 +207,7 @@
"@jupyterlab/cell-toolbar",
"@jupyterlab/celltags",
"@jupyterlab/codeeditor",
"@jupyterlab/collaboration",
"@jupyterlab/completer",
"@jupyterlab/console",
"@jupyterlab/coreutils",
@ -210,6 +216,7 @@
"@jupyterlab/documentsearch",
"@jupyterlab/filebrowser",
"@jupyterlab/fileeditor",
"@jupyterlab/lsp",
"@jupyterlab/mainmenu",
"@jupyterlab/notebook",
"@jupyterlab/observables",
@ -224,7 +231,6 @@
"@jupyterlab/terminal",
"@jupyterlab/tooltip",
"@jupyterlab/translation",
"@jupyterlab/user",
"@jupyterlab/ui-components",
"@lumino/algorithm",
"@lumino/application",

@ -30,14 +30,14 @@
"watch": "tsc -w --listEmittedFiles"
},
"dependencies": {
"@jupyterlab/buildutils": "^4.0.0-alpha.10",
"@jupyterlab/buildutils": "^4.0.0-alpha.14",
"commander": "^6.2.0",
"fs-extra": "^9.1.0",
"typescript": "~4.6.3"
"typescript": "~4.7.3"
},
"devDependencies": {
"@types/fs-extra": "^9.0.10",
"@types/node": "^14.6.1",
"rimraf": "~3.0.0"
"rimraf": "^3.0.2"
}
}

@ -42,7 +42,7 @@
"watch:lib": "lerna exec --stream --scope @jupyter-notebook/metapackage jlpm watch"
},
"devDependencies": {
"@jupyterlab/buildutils": "^4.0.0-alpha.10",
"@jupyterlab/buildutils": "^4.0.0-alpha.14",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"eslint": "^7.10.0",
@ -59,7 +59,7 @@
"npm-run-all": "^4.1.5",
"prettier": "^1.19.0",
"rimraf": "^3.0.2",
"typescript": "~4.6.3"
"typescript": "~4.7.3"
},
"jupyter-releaser": {
"hooks": {

@ -34,6 +34,6 @@
"@jupyter-notebook/ui-components": "file:../ui-components"
},
"devDependencies": {
"typescript": "~4.6.3"
"typescript": "~4.7.3"
}
}

@ -41,25 +41,25 @@
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.5",
"@jupyter-notebook/ui-components": "^7.0.0-alpha.5",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/celltags": "^4.0.0-alpha.10",
"@jupyterlab/codeeditor": "^4.0.0-alpha.10",
"@jupyterlab/codemirror": "^4.0.0-alpha.10",
"@jupyterlab/console": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu": "^4.0.0-alpha.10",
"@jupyterlab/settingregistry": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@lumino/coreutils": "^1.12.0",
"@lumino/disposable": "^1.10.1",
"@lumino/widgets": "^1.32.0"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/apputils": "^4.0.0-alpha.14",
"@jupyterlab/celltags": "^4.0.0-alpha.14",
"@jupyterlab/codeeditor": "^4.0.0-alpha.14",
"@jupyterlab/codemirror": "^4.0.0-alpha.14",
"@jupyterlab/console": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/docmanager": "^4.0.0-alpha.14",
"@jupyterlab/docregistry": "^4.0.0-alpha.14",
"@jupyterlab/mainmenu": "^4.0.0-alpha.14",
"@jupyterlab/settingregistry": "^4.0.0-alpha.14",
"@jupyterlab/translation": "^4.0.0-alpha.14",
"@lumino/coreutils": "^2.0.0-alpha.6",
"@lumino/disposable": "^2.0.0-alpha.6",
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -443,7 +443,7 @@ const title: JupyterFrontEndPlugin<void> = {
return;
}
const result = await renameDialog(docManager, current.context.path);
const result = await renameDialog(docManager, current.context);
// activate the current widget to bring the focus
if (current) {
@ -454,7 +454,7 @@ const title: JupyterFrontEndPlugin<void> = {
return;
}
const newPath = current.context.path ?? result.path;
const newPath = current.context.path;
const basename = PathExt.basename(newPath);
h.textContent = basename.replace(STRIP_IPYNB, '');

@ -43,27 +43,27 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.10",
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
"@lumino/algorithm": "^1.9.1",
"@lumino/coreutils": "^1.12.0",
"@lumino/messaging": "^1.10.1",
"@lumino/polling": "^1.10.0",
"@lumino/signaling": "^1.10.1",
"@lumino/widgets": "^1.32.0"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/docregistry": "^4.0.0-alpha.14",
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.14",
"@jupyterlab/ui-components": "^4.0.0-alpha.29",
"@lumino/algorithm": "^2.0.0-alpha.6",
"@lumino/coreutils": "^2.0.0-alpha.6",
"@lumino/messaging": "^2.0.0-alpha.6",
"@lumino/polling": "^2.0.0-alpha.6",
"@lumino/signaling": "^2.0.0-alpha.6",
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.12.1",
"@jupyterlab/testutils": "^4.0.0-alpha.10",
"@jupyterlab/testutils": "^4.0.0-alpha.14",
"@types/jest": "^26.0.10",
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"rimraf": "^3.0.2",
"ts-jest": "^26.3.0",
"typescript": "~4.6.3"
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -28,10 +28,7 @@ export class NotebookApp extends JupyterFrontEnd<INotebookShell> {
* @param options The instantiation options for an application.
*/
constructor(options: NotebookApp.IOptions = { shell: new NotebookShell() }) {
super({
...options,
shell: options.shell ?? new NotebookShell()
});
super({ ...options, shell: options.shell ?? new NotebookShell() });
if (options.mimeExtensions) {
for (const plugin of createRendermimePlugins(options.mimeExtensions)) {
this.registerPlugin(plugin);

@ -5,7 +5,7 @@ import { JupyterFrontEnd } from '@jupyterlab/application';
import { DocumentRegistry } from '@jupyterlab/docregistry';
import { ArrayExt, find, IIterator, iter } from '@lumino/algorithm';
import { ArrayExt } from '@lumino/algorithm';
import { Token } from '@lumino/coreutils';
@ -107,7 +107,7 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
* Activate a widget in its area.
*/
activateById(id: string): void {
const widget = find(this.widgets('main'), w => w.id === id);
const widget = this._main.widgets.find(w => w.id === id);
if (widget) {
widget.activate();
}
@ -168,16 +168,20 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
*
* @param area The area
*/
widgets(area: Shell.Area): IIterator<Widget> {
*widgets(area: Shell.Area): IterableIterator<Widget> {
switch (area ?? 'main') {
case 'top':
return iter(this._topHandler.panel.widgets);
yield* this._topHandler.panel.widgets;
return;
case 'menu':
return iter(this._menuHandler.panel.widgets);
yield* this._menuHandler.panel.widgets;
return;
case 'main':
return iter(this._main.widgets);
yield* this._main.widgets;
return;
default:
throw new Error(`Invalid area: ${area}`);
console.error(`This shell has no area called "${area}"`);
return;
}
}

@ -5,8 +5,6 @@ import { NotebookShell, INotebookShell } from '@jupyter-notebook/application';
import { JupyterFrontEnd } from '@jupyterlab/application';
import { toArray } from '@lumino/algorithm';
import { Widget } from '@lumino/widgets';
describe('Shell', () => {
@ -31,15 +29,15 @@ describe('Shell', () => {
it('should add widgets to existing areas', () => {
const widget = new Widget();
shell.add(widget, 'main');
const widgets = toArray(shell.widgets('main'));
const widgets = Array.from(shell.widgets('main'));
expect(widgets).toEqual([widget]);
});
it('should throw an exception if the area does not exist', () => {
it('should be empty and console.error if area does not exist', () => {
const spy = jest.spyOn(console, 'error');
const jupyterFrontEndShell = shell as JupyterFrontEnd.IShell;
expect(() => {
jupyterFrontEndShell.widgets('left');
}).toThrow('Invalid area: left');
expect(Array.from(jupyterFrontEndShell.widgets('left'))).toHaveLength(0);
expect(spy).toHaveBeenCalled();
});
});
@ -62,7 +60,7 @@ describe('Shell', () => {
const widget = new Widget();
widget.id = 'foo';
shell.add(widget, 'top');
const widgets = toArray(shell.widgets('top'));
const widgets = Array.from(shell.widgets('top'));
expect(widgets.length).toBeGreaterThan(0);
});
@ -70,7 +68,7 @@ describe('Shell', () => {
const widget = new Widget();
widget.id = 'foo';
shell.add(widget, 'top', { rank: 10 });
const widgets = toArray(shell.widgets('top'));
const widgets = Array.from(shell.widgets('top'));
expect(widgets.length).toBeGreaterThan(0);
});
});
@ -80,7 +78,7 @@ describe('Shell', () => {
const widget = new Widget();
widget.id = 'foo';
shell.add(widget, 'main');
const widgets = toArray(shell.widgets('main'));
const widgets = Array.from(shell.widgets('main'));
expect(widgets.length).toBeGreaterThan(0);
});
});

@ -39,14 +39,14 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/console": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@lumino/algorithm": "^1.9.1"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/console": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@lumino/algorithm": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -39,16 +39,16 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/services": "^7.0.0-alpha.10",
"@lumino/algorithm": "^1.9.1"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/docmanager": "^4.0.0-alpha.14",
"@jupyterlab/docregistry": "^4.0.0-alpha.14",
"@jupyterlab/services": "^7.0.0-alpha.14",
"@lumino/algorithm": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -40,13 +40,13 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.5",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/documentsearch": "^4.0.0-alpha.10",
"@lumino/widgets": "^1.32.0"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/documentsearch": "^4.0.0-alpha.14",
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -40,14 +40,14 @@
},
"dependencies": {
"@jupyter-notebook/ui-components": "^7.0.0-alpha.5",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/apputils": "^4.0.0-alpha.14",
"@jupyterlab/mainmenu": "^4.0.0-alpha.14",
"@jupyterlab/translation": "^4.0.0-alpha.14"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -44,19 +44,19 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.5",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docregistry": "^4.0.0-alpha.10",
"@jupyterlab/notebook": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@lumino/commands": "^1.20.0",
"@lumino/disposable": "^1.10.1"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/apputils": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/docregistry": "^4.0.0-alpha.14",
"@jupyterlab/notebook": "^4.0.0-alpha.14",
"@jupyterlab/translation": "^4.0.0-alpha.14",
"@lumino/commands": "^2.0.0-alpha.6",
"@lumino/disposable": "^2.0.0-alpha.6"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0-alpha.10",
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"@jupyterlab/builder": "^4.0.0-alpha.14",
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -40,19 +40,19 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.5",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/cells": "^4.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/notebook": "^4.0.0-alpha.10",
"@jupyterlab/settingregistry": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@lumino/polling": "^1.10.0",
"@lumino/widgets": "^1.32.0"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/apputils": "^4.0.0-alpha.14",
"@jupyterlab/cells": "^4.0.0-alpha.14",
"@jupyterlab/docmanager": "^4.0.0-alpha.14",
"@jupyterlab/notebook": "^4.0.0-alpha.14",
"@jupyterlab/settingregistry": "^4.0.0-alpha.14",
"@jupyterlab/translation": "^4.0.0-alpha.14",
"@lumino/polling": "^2.0.0-alpha.6",
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -12,7 +12,7 @@ import {
IToolbarWidgetRegistry
} from '@jupyterlab/apputils';
import { CodeCell } from '@jupyterlab/cells';
import { Cell, CodeCell } from '@jupyterlab/cells';
import { Text, Time } from '@jupyterlab/coreutils';
@ -280,31 +280,29 @@ const scrollOutput: JupyterFrontEndPlugin<void> = {
cell.toggleClass(SCROLLED_OUTPUTS_CLASS, scroll);
};
tracker.widgetAdded.connect((sender, notebook) => {
notebook.model?.cells.changed.connect((sender, changed) => {
// process new cells only
if (!(changed.type === 'add')) {
return;
const handlers: { [id: string]: () => void } = {};
const setAutoScroll = (cell: Cell) => {
if (cell.model.type === 'code') {
const codeCell = cell as CodeCell;
const id = codeCell.model.id;
autoScroll(codeCell);
if (handlers[id]) {
codeCell.outputArea.model.changed.disconnect(handlers[id]);
}
const [cellModel] = changed.newValues;
notebook.content.widgets.forEach(cell => {
if (cell.model.id === cellModel.id && cell.model.type === 'code') {
const codeCell = cell as CodeCell;
codeCell.outputArea.model.changed.connect(() =>
autoScroll(codeCell)
);
}
});
});
handlers[id] = () => autoScroll(codeCell);
codeCell.outputArea.model.changed.connect(handlers[id]);
}
};
tracker.widgetAdded.connect((sender, notebook) => {
// when the notebook widget is created, process all the cells
// TODO: investigate why notebook.content.fullyRendered is not enough
notebook.sessionContext.ready.then(() => {
notebook.content.widgets.forEach(cell => {
if (cell.model.type === 'code') {
autoScroll(cell as CodeCell);
}
});
notebook.content.widgets.forEach(setAutoScroll);
});
notebook.model?.cells.changed.connect((sender, args) => {
notebook.content.widgets.forEach(setAutoScroll);
});
});

@ -6,16 +6,53 @@
@import './variables.css';
/* Document oriented look for the notebook (scrollbar to the right of the page) */
/**
Document oriented look for the notebook.
This includes changes to the look and feel of the JupyterLab Notebook
component like:
- scrollbar to the right of the page
- drop shadow on the notebook
- smaller empty space at the bottom of the notebook
- compact view on mobile
*/
/* Keep the notebook centered on the page */
body[data-notebook='notebooks'] .jp-NotebookPanel-toolbar {
padding-left: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5);
padding-right: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5);
}
body[data-notebook='notebooks'] .jp-Notebook {
padding-top: unset;
padding-left: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5);
padding-right: calc(
calc(
100% - var(--jp-notebook-max-width) - var(--jp-notebook-padding-offset)
) * 0.5
);
background: var(--jp-layout-color2);
}
body[data-notebook='notebooks'] .jp-WindowedPanel-inner {
margin-top: var(--jp-notebook-toolbar-margin-bottom);
}
body[data-notebook='notebooks'] .jp-Notebook-cell {
background: var(--jp-layout-color0);
padding-left: calc(2 * var(--jp-cell-padding));
padding-right: calc(2 * var(--jp-cell-padding));
}
/* Empty space at the bottom of the notebook (similar to classic) */
body[data-notebook='notebooks'] .jp-Notebook.jp-mod-scrollPastEnd::after {
min-height: 100px;
}
/* Fix background colors */
body[data-notebook='notebooks'] .jp-Notebook > * {
background: var(--jp-layout-color0);
padding: var(--jp-notebook-padding);
}
body[data-notebook='notebooks']
@ -24,13 +61,98 @@ body[data-notebook='notebooks']
background: var(--jp-layout-color0) !important;
}
body[data-notebook='notebooks'] .jp-Notebook > *:first-child {
padding-top: var(--jp-notebook-padding-offset);
margin-top: var(--jp-notebook-toolbar-margin-bottom);
/**
Extra padding to the first and and last cell of the notebook.
TODO: revisit when https://github.com/jupyterlab/jupyterlab/issues/13151 is fixed
*/
.jp-Notebook-cell[data-windowed-list-index='0'] {
padding-top: calc(2 * var(--jp-notebook-padding));
}
body[data-notebook='notebooks'] .jp-WindowedPanel-window > *:last-child {
padding-bottom: calc(2 * var(--jp-notebook-padding));
}
body[data-notebook='notebooks']
.jp-Notebook
.jp-Notebook-cell:not(:first-child)::before {
content: ' ';
height: 100%;
position: absolute;
top: 0;
width: 11px;
}
/* Cell toolbar adjustements */
body[data-notebook='notebooks'] .jp-cell-toolbar {
background: unset;
box-shadow: unset;
}
body[data-notebook='notebooks']
.jp-RawCell[data-windowed-list-index='0']
.jp-cell-toolbar,
body[data-notebook='notebooks']
.jp-MarkdownCell[data-windowed-list-index='0']
.jp-cell-toolbar {
top: calc(2 * var(--jp-notebook-padding));
}
/** first code cell on mobile
(keep the selector above the media query)
*/
body[data-notebook='notebooks']
.jp-CodeCell[data-windowed-list-index='0']
.jp-cell-toolbar {
top: unset;
}
@media only screen and (max-width: 760px) {
/* first code cell on mobile */
body[data-notebook='notebooks']
.jp-CodeCell[data-windowed-list-index='0']
.jp-cell-toolbar {
top: var(--jp-notebook-padding);
}
body[data-notebook='notebooks'] .jp-MarkdownCell .jp-cell-toolbar,
body[data-notebook='notebooks'] .jp-RawCell .jp-cell-toolbar {
top: calc(0.5 * var(--jp-notebook-padding));
}
}
/* Mobile View */
body[data-format='mobile'] .jp-NotebookCheckpoint {
display: none;
}
body[data-format='mobile'] .jp-Notebook > *:first-child {
margin-top: 0;
}
/* Virtual Notebook fixes */
body[data-notebook='notebooks'] .jp-WindowedPanel-window {
background: var(--jp-layout-color0);
/* TODO: remove when https://github.com/jupyterlab/jupyterlab/pull/13154 is released */
width: unset;
}
body[data-notebook='notebooks'] .jp-WindowedPanel-inner {
/* TODO: remove when https://github.com/jupyterlab/jupyterlab/pull/13157 is released */
width: unset;
}
/* Notebook box shadow */
body[data-notebook='notebooks'] .jp-Notebook > *:first-child:not(:last-child) {
box-shadow: 0px 0px 12px 1px var(--jp-shadow-umbra-color);
}
body[data-notebook='notebooks'] .jp-Notebook > *:first-child:not(:last-child) {
box-shadow: 0px 0px 12px 1px rgb(87 87 87 / 20%);
box-shadow: 0px 0px 12px 1px var(--jp-shadow-umbra-color);
}
body[data-notebook='notebooks']
@ -42,26 +164,7 @@ body[data-notebook='notebooks']
bottom: 0;
left: 0;
right: 0;
box-shadow: 0px 0px 12px 1px rgb(87 87 87 / 20%);
margin-bottom: -11px;
}
body[data-notebook='notebooks'] .jp-Notebook {
padding-top: unset;
padding-bottom: unset;
padding-left: calc(calc(100% - var(--jp-notebook-max-width)) * 0.5);
padding-right: calc(
calc(
100% - var(--jp-notebook-max-width) - var(--jp-notebook-padding-offset)
) * 0.5
);
background: var(--jp-layout-color2);
}
body[data-notebook='notebooks'] .jp-Notebook.jp-mod-scrollPastEnd::after {
background: var(--jp-layout-color0);
min-height: var(--jp-notebook-padding);
box-shadow: 0px 0px 12px 1px rgb(87 87 87 / 20%);
box-shadow: 0px 0px 12px 1px var(--jp-shadow-umbra-color);
}
body[data-notebook='notebooks']
@ -77,35 +180,7 @@ body[data-notebook='notebooks']
width: 11px;
}
body[data-notebook='notebooks']
.jp-Notebook
.jp-Notebook-cell:not(:first-child)::before {
box-shadow: -11px 0 11px -11px rgb(87 87 87 / 20%) inset;
left: -11px;
}
body[data-notebook='notebooks']
.jp-Notebook
.jp-Notebook-cell:not(:first-child)::after {
box-shadow: 12px 0 11px -11px rgb(87 87 87 / 20%) inset;
right: -11px;
}
/* Cell toolbar adjustements */
body[data-notebook='notebooks'] .jp-cell-toolbar {
background: unset;
top: unset;
box-shadow: unset;
}
@media only screen and (max-width: 760px) {
body[data-notebook='notebooks'] .jp-cell-toolbar {
top: 5px;
}
}
/* ---- */
/* Additional customizations of the components on the notebook page */
.jp-NotebookKernelLogo {
flex: 0 0 auto;
@ -186,13 +261,3 @@ body[data-notebook='notebooks'] .jp-cell-toolbar {
overflow: hidden;
white-space: nowrap;
}
/* Mobile View */
body[data-format='mobile'] .jp-NotebookCheckpoint {
display: none;
}
body[data-format='mobile'] .jp-Notebook > *:first-child {
margin-top: 0;
}

@ -39,14 +39,14 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/terminal": "^4.0.0-alpha.10",
"@lumino/algorithm": "^1.9.1"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/terminal": "^4.0.0-alpha.14",
"@lumino/algorithm": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -41,24 +41,24 @@
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.5",
"@jupyter-notebook/tree": "^7.0.0-alpha.5",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/filebrowser": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu": "^4.0.0-alpha.10",
"@jupyterlab/services": "^7.0.0-alpha.10",
"@jupyterlab/settingregistry": "^4.0.0-alpha.10",
"@jupyterlab/statedb": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
"@lumino/algorithm": "^1.9.1",
"@lumino/commands": "^1.20.0",
"@lumino/widgets": "^1.32.0"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/apputils": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/docmanager": "^4.0.0-alpha.14",
"@jupyterlab/filebrowser": "^4.0.0-alpha.14",
"@jupyterlab/mainmenu": "^4.0.0-alpha.14",
"@jupyterlab/services": "^7.0.0-alpha.14",
"@jupyterlab/settingregistry": "^4.0.0-alpha.14",
"@jupyterlab/statedb": "^4.0.0-alpha.14",
"@jupyterlab/translation": "^4.0.0-alpha.14",
"@jupyterlab/ui-components": "^4.0.0-alpha.29",
"@lumino/algorithm": "^2.0.0-alpha.6",
"@lumino/commands": "^2.0.0-alpha.6",
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -40,24 +40,25 @@
},
"dependencies": {
"@jupyter-notebook/application": "^7.0.0-alpha.5",
"@jupyterlab/application": "^4.0.0-alpha.10",
"@jupyterlab/apputils": "^4.0.0-alpha.10",
"@jupyterlab/coreutils": "^6.0.0-alpha.10",
"@jupyterlab/docmanager": "^4.0.0-alpha.10",
"@jupyterlab/filebrowser": "^4.0.0-alpha.10",
"@jupyterlab/mainmenu": "^4.0.0-alpha.10",
"@jupyterlab/services": "^7.0.0-alpha.10",
"@jupyterlab/settingregistry": "^4.0.0-alpha.10",
"@jupyterlab/statedb": "^4.0.0-alpha.10",
"@jupyterlab/translation": "^4.0.0-alpha.10",
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
"@lumino/algorithm": "^1.9.1",
"@lumino/commands": "^1.20.0",
"@lumino/widgets": "^1.32.0"
"@jupyterlab/application": "^4.0.0-alpha.14",
"@jupyterlab/apputils": "^4.0.0-alpha.14",
"@jupyterlab/coreutils": "^6.0.0-alpha.14",
"@jupyterlab/docmanager": "^4.0.0-alpha.14",
"@jupyterlab/filebrowser": "^4.0.0-alpha.14",
"@jupyterlab/mainmenu": "^4.0.0-alpha.14",
"@jupyterlab/services": "^7.0.0-alpha.14",
"@jupyterlab/settingregistry": "^4.0.0-alpha.14",
"@jupyterlab/statedb": "^4.0.0-alpha.14",
"@jupyterlab/translation": "^4.0.0-alpha.14",
"@jupyterlab/ui-components": "^4.0.0-alpha.29",
"@lumino/algorithm": "^2.0.0-alpha.6",
"@lumino/commands": "^2.0.0-alpha.6",
"@lumino/coreutils": "^2.0.0-alpha.6",
"@lumino/widgets": "^2.0.0-alpha.6"
},
"devDependencies": {
"rimraf": "~3.0.0",
"typescript": "~4.6.3"
"rimraf": "^3.0.2",
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -43,20 +43,20 @@
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/ui-components": "^4.0.0-alpha.25",
"@jupyterlab/ui-components": "^4.0.0-alpha.29",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@jupyterlab/testutils": "^4.0.0-alpha.10",
"@jupyterlab/testutils": "^4.0.0-alpha.14",
"@types/jest": "^26.0.10",
"babel-loader": "^8.0.6",
"jest": "^26.4.2",
"rimraf": "~3.0.0",
"rimraf": "^3.0.2",
"ts-jest": "^26.3.0",
"typescript": "~4.6.3"
"typescript": "~4.7.3"
},
"publishConfig": {
"access": "public"

@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.5", "jupyterlab>=4.0.0a25,<5", "ypy-websocket==0.2"]
requires = ["hatchling>=1.5", "jupyterlab>=4.0.0a29,<5"]
build-backend = "hatchling.build"
[project]
@ -30,11 +30,10 @@ classifiers = [
]
dependencies = [
"jupyter_server>=1.16.0,<2",
"jupyterlab>=4.0.0a24,<5",
"jupyterlab>=4.0.0a29,<5",
"jupyterlab_server>=2.13,<3",
"notebook_shim>=0.1,<0.2",
"tornado>=6.1.0",
"ypy-websocket==0.2",
]
dynamic = ["version"]

@ -1,22 +0,0 @@
{
"compilerOptions": {
"declaration": true,
"noEmitOnError": true,
"noUnusedLocals": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es2015",
"lib": [
"es2015",
"es2015.collection",
"dom",
"es2015.iterable",
"es2017.object"
],
"types": ["jest"],
"jsx": "react",
"resolveJsonModule": true,
"esModuleInterop": true,
"skipLibCheck": true
}
}

@ -16,7 +16,7 @@
"strict": true,
"skipLibCheck": true,
"strictNullChecks": true,
"target": "es2017",
"target": "ES2018",
"types": []
}
}

@ -1,25 +1,18 @@
{
"compilerOptions": {
"declaration": true,
"noImplicitAny": true,
"noEmitOnError": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es2015",
"outDir": "lib",
"lib": [
"es2015",
"es2015.collection",
"dom",
"es2015.iterable",
"es2017.object"
],
"target": "ES2018",
"lib": ["DOM", "DOM.iterable"],
"types": ["jest", "node"],
"jsx": "react",
"resolveJsonModule": true,
"esModuleInterop": true,
"strictNullChecks": true,
"skipLibCheck": true
"skipLibCheck": true,
"strictNullChecks": true
}
}

@ -6,6 +6,7 @@
"license": "BSD-3-Clause",
"description": "Jupyter Notebook UI Tests",
"scripts": {
"rimraf": "rimraf",
"start": "jupyter notebook --config test/jupyter_server_config.py",
"start:detached": "yarn run start&",
"test": "playwright test",
@ -14,10 +15,8 @@
"test:update": "playwright test --update-snapshots"
},
"dependencies": {
"@jupyterlab/galata": "~5.0.0-alpha.9",
"@playwright/test": "~1.17.0"
},
"resolutions": {
"@playwright/test": "~1.17.0"
"@jupyterlab/galata": "~5.0.0-alpha.14",
"@playwright/test": "~1.26.0",
"rimraf": "^3.0.2"
}
}

@ -2,9 +2,9 @@ import baseConfig from '@jupyterlab/galata/lib/playwright-config';
module.exports = {
...baseConfig,
timeout: 240000,
use: {
appPath: ''
appPath: '',
video: 'retain-on-failure'
},
retries: 1
};

@ -13,10 +13,9 @@ test.use({ autoGoto: false });
const processRenameDialog = async (page, prevName: string, newName: string) => {
// Rename in the input dialog
await page.fill(
`//div[normalize-space(.)='File Path${prevName}New Name']/input`,
newName
);
await page
.locator(`text=File Path${prevName}New Name >> input`)
.fill(newName);
await Promise.all([
await page.click('text="Rename"'),
@ -44,7 +43,7 @@ test.describe('Editor', () => {
await page.click(`text="${FILE}"`);
const newName = 'test.yml';
await processRenameDialog(page, file, newName);
await processRenameDialog(page, FILE, newName);
// Check the URL contains the new name
const url = page.url();
@ -61,7 +60,7 @@ test.describe('Editor', () => {
// Rename in the input dialog
const newName = 'test.yml';
await processRenameDialog(page, file, newName);
await processRenameDialog(page, FILE, newName);
// Check the URL contains the new name
const url = page.url();

@ -23,6 +23,9 @@ test.describe('General', () => {
".jp-Notebook-ExecutionIndicator[data-status='idle']"
);
// wait for the checkpoint indicator to be displayed
await page.waitForSelector('.jp-NotebookCheckpoint');
// force switching back to command mode to avoid capturing the cursor in the screenshot
await page.evaluate(async () => {
await window.jupyterapp.commands.execute('notebook:enter-command-mode');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@ -7,7 +7,7 @@ import { expect } from '@playwright/test';
import { test } from './fixtures';
import { runAndAdvance, waitForKernelReady } from './utils';
import { runAndAdvance } from './utils';
const NOTEBOOK = 'example.ipynb';
@ -42,10 +42,9 @@ test.describe('Notebook', () => {
// Rename in the input dialog
const newName = 'test.ipynb';
const newNameStripped = 'test';
await page.fill(
`//div[normalize-space(.)='File Path${notebook}New Name']/input`,
newName
);
await page
.locator(`text=File Path${NOTEBOOK}New Name >> input`)
.fill(newName);
await Promise.all([
await page.click('text="Rename"'),
@ -71,12 +70,21 @@ test.describe('Notebook', () => {
);
await page.goto(`notebooks/${tmpPath}/${notebook}`);
await waitForKernelReady(page);
// run the two cells
await runAndAdvance(page);
// wait for the checkpoint indicator to be displayed before exexuting the cells
await page.waitForSelector('.jp-NotebookCheckpoint');
await page.click('.jp-Notebook');
// execute the first cell
await runAndAdvance(page);
await page
.locator('.jp-mod-outputsScrolled')
.nth(0)
.waitFor({ state: 'visible' });
await page.waitForSelector('.jp-Cell-outputArea pre');
// execute the second cell
await runAndAdvance(page);
// the second cell should not be auto scrolled
expect(page.locator('.jp-mod-outputsScrolled').nth(1)).toHaveCount(0);
const checkCell = async (n: number): Promise<boolean> => {
const scrolled = await page.$eval(`.jp-Notebook-cell >> nth=${n}`, el =>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 37 KiB

@ -30,20 +30,30 @@ test.describe('Smoke', () => {
page.click('text="Notebook"')
]);
try {
// we may have to select the kernel first
await notebook.click('text="Select"', { timeout: 5000 });
} catch (e) {
// The kernel is already selected
}
// Enter code in the first cell
await notebook.fill('//textarea', 'import math');
await notebook.press('//textarea', 'Enter');
await notebook.press('//textarea', 'Enter');
await notebook.fill('//textarea', 'math.pi');
await notebook.locator(
'.jp-Cell-inputArea >> .cm-editor >> .cm-content[contenteditable="true"]'
).type(`import math
math.pi`);
// Run the cell
runAndAdvance(notebook);
// Enter code in the next cell
await notebook.fill(
"//div[normalize-space(.)=' ']/div[1]/textarea",
'import this'
);
await notebook
.locator(
'.jp-Cell-inputArea >> .cm-editor >> .cm-content[contenteditable="true"]'
)
.nth(1)
.type(`import this`);
// Run the cell
runAndAdvance(notebook);
@ -63,7 +73,7 @@ test.describe('Smoke', () => {
// Shut down the kernels
await tree2.click('text="Running"');
await tree2.click('text="Shut Down All"');
await tree2.click("//div[normalize-space(.)='Shut Down All']");
await tree2.press('.jp-Dialog', 'Enter');
// Close the pages
await tree2.close();

@ -8,7 +8,7 @@ import { Page } from '@playwright/test';
export async function runAndAdvance(
page: IJupyterLabPageFixture | Page
): Promise<void> {
await page.click(".jp-Toolbar-item [data-icon='ui-components:run']");
await page.keyboard.press('Shift+Enter');
}
/**

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save