Skip to content

Commit 2b9d339

Browse files
jtpiov-lozko
andauthored
Update to JupyterLab 4.2.0b0 (#7312)
* Update to JupyterLab 4.2.0b0 * fix currentChanged * fix releaser hook * Bump galata * add cell executor * Fix full CSS Co-Authored-By: v-lozko <[email protected]> * Default to defer for now * undo max-width adjustment for now * add TODO --------- Co-authored-by: v-lozko <[email protected]>
1 parent 3b8e673 commit 2b9d339

File tree

23 files changed

+1858
-1677
lines changed

23 files changed

+1858
-1677
lines changed

.github/workflows/buildutils.yml

Lines changed: 2 additions & 2 deletions
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 "jupyterlab>=4.2.0a2,<4.3" hatch
32+
python -m pip install -U "jupyterlab>=4.2.0b0,<4.3" hatch
3333
jlpm
3434
jlpm run build
3535
@@ -79,6 +79,6 @@ jobs:
7979

8080
- name: Install dependencies
8181
run: |
82-
python -m pip install -U "jupyterlab>=4.2.0a2,<4.3" pip
82+
python -m pip install -U "jupyterlab>=4.2.0b0,<4.3" pip
8383
jlpm
8484
jlpm run build

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ repos:
4444
files: "^notebook"
4545
stages: [manual]
4646
args: ["--install-types", "--non-interactive"]
47-
additional_dependencies: ["traitlets>=5.13", "tornado", "jupyter_server>=2.10", "jupyterlab_server>=2.25", "jupyterlab>=4.2.0a2,<4.3"]
47+
additional_dependencies: ["traitlets>=5.13", "tornado", "jupyter_server>=2.10", "jupyterlab_server>=2.25", "jupyterlab>=4.2.0b0,<4.3"]
4848

4949
- repo: https://github.com/pre-commit/pygrep-hooks
5050
rev: 'v1.10.0'

app/package.json

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -131,59 +131,59 @@
131131
"@jupyter-notebook/tree": "^7.2.0-alpha.0",
132132
"@jupyter-notebook/tree-extension": "^7.2.0-alpha.0",
133133
"@jupyter-notebook/ui-components": "^7.2.0-alpha.0",
134-
"@jupyterlab/application-extension": "~4.2.0-alpha.2",
135-
"@jupyterlab/apputils-extension": "~4.2.0-alpha.2",
136-
"@jupyterlab/attachments": "~4.2.0-alpha.2",
137-
"@jupyterlab/cell-toolbar-extension": "~4.2.0-alpha.2",
138-
"@jupyterlab/celltags-extension": "~4.2.0-alpha.2",
139-
"@jupyterlab/codemirror": "~4.2.0-alpha.2",
140-
"@jupyterlab/codemirror-extension": "~4.2.0-alpha.2",
141-
"@jupyterlab/completer-extension": "~4.2.0-alpha.2",
142-
"@jupyterlab/console-extension": "~4.2.0-alpha.2",
143-
"@jupyterlab/coreutils": "~6.2.0-alpha.2",
144-
"@jupyterlab/csvviewer-extension": "~4.2.0-alpha.2",
145-
"@jupyterlab/debugger-extension": "~4.2.0-alpha.2",
146-
"@jupyterlab/docmanager-extension": "~4.2.0-alpha.2",
147-
"@jupyterlab/documentsearch-extension": "~4.2.0-alpha.2",
148-
"@jupyterlab/extensionmanager-extension": "~4.2.0-alpha.2",
149-
"@jupyterlab/filebrowser-extension": "~4.2.0-alpha.2",
150-
"@jupyterlab/fileeditor-extension": "~4.2.0-alpha.2",
151-
"@jupyterlab/help-extension": "~4.2.0-alpha.2",
152-
"@jupyterlab/htmlviewer-extension": "~4.2.0-alpha.2",
153-
"@jupyterlab/hub-extension": "~4.2.0-alpha.2",
154-
"@jupyterlab/imageviewer-extension": "~4.2.0-alpha.2",
155-
"@jupyterlab/javascript-extension": "~4.2.0-alpha.2",
156-
"@jupyterlab/json-extension": "~4.2.0-alpha.2",
157-
"@jupyterlab/lsp": "~4.2.0-alpha.2",
158-
"@jupyterlab/lsp-extension": "~4.2.0-alpha.2",
159-
"@jupyterlab/mainmenu-extension": "~4.2.0-alpha.2",
160-
"@jupyterlab/markdownviewer-extension": "~4.2.0-alpha.2",
161-
"@jupyterlab/markedparser-extension": "~4.2.0-alpha.2",
162-
"@jupyterlab/mathjax-extension": "~4.2.0-alpha.2",
163-
"@jupyterlab/mermaid-extension": "~4.2.0-alpha.2",
164-
"@jupyterlab/metadataform-extension": "~4.2.0-alpha.2",
165-
"@jupyterlab/notebook-extension": "~4.2.0-alpha.2",
166-
"@jupyterlab/pdf-extension": "~4.2.0-alpha.2",
167-
"@jupyterlab/pluginmanager-extension": "~4.2.0-alpha.2",
168-
"@jupyterlab/running-extension": "~4.2.0-alpha.2",
169-
"@jupyterlab/settingeditor": "~4.2.0-alpha.2",
170-
"@jupyterlab/settingeditor-extension": "~4.2.0-alpha.2",
171-
"@jupyterlab/shortcuts-extension": "~4.2.0-alpha.2",
172-
"@jupyterlab/terminal-extension": "~4.2.0-alpha.2",
173-
"@jupyterlab/theme-dark-extension": "~4.2.0-alpha.2",
174-
"@jupyterlab/theme-light-extension": "~4.2.0-alpha.2",
175-
"@jupyterlab/toc-extension": "~6.2.0-alpha.2",
176-
"@jupyterlab/tooltip-extension": "~4.2.0-alpha.2",
177-
"@jupyterlab/translation-extension": "~4.2.0-alpha.2",
178-
"@jupyterlab/ui-components-extension": "~4.2.0-alpha.2",
179-
"@jupyterlab/vega5-extension": "~4.2.0-alpha.2",
134+
"@jupyterlab/application-extension": "~4.2.0-beta.0",
135+
"@jupyterlab/apputils-extension": "~4.2.0-beta.0",
136+
"@jupyterlab/attachments": "~4.2.0-beta.0",
137+
"@jupyterlab/cell-toolbar-extension": "~4.2.0-beta.0",
138+
"@jupyterlab/celltags-extension": "~4.2.0-beta.0",
139+
"@jupyterlab/codemirror": "~4.2.0-beta.0",
140+
"@jupyterlab/codemirror-extension": "~4.2.0-beta.0",
141+
"@jupyterlab/completer-extension": "~4.2.0-beta.0",
142+
"@jupyterlab/console-extension": "~4.2.0-beta.0",
143+
"@jupyterlab/coreutils": "~6.2.0-beta.0",
144+
"@jupyterlab/csvviewer-extension": "~4.2.0-beta.0",
145+
"@jupyterlab/debugger-extension": "~4.2.0-beta.0",
146+
"@jupyterlab/docmanager-extension": "~4.2.0-beta.0",
147+
"@jupyterlab/documentsearch-extension": "~4.2.0-beta.0",
148+
"@jupyterlab/extensionmanager-extension": "~4.2.0-beta.0",
149+
"@jupyterlab/filebrowser-extension": "~4.2.0-beta.0",
150+
"@jupyterlab/fileeditor-extension": "~4.2.0-beta.0",
151+
"@jupyterlab/help-extension": "~4.2.0-beta.0",
152+
"@jupyterlab/htmlviewer-extension": "~4.2.0-beta.0",
153+
"@jupyterlab/hub-extension": "~4.2.0-beta.0",
154+
"@jupyterlab/imageviewer-extension": "~4.2.0-beta.0",
155+
"@jupyterlab/javascript-extension": "~4.2.0-beta.0",
156+
"@jupyterlab/json-extension": "~4.2.0-beta.0",
157+
"@jupyterlab/lsp": "~4.2.0-beta.0",
158+
"@jupyterlab/lsp-extension": "~4.2.0-beta.0",
159+
"@jupyterlab/mainmenu-extension": "~4.2.0-beta.0",
160+
"@jupyterlab/markdownviewer-extension": "~4.2.0-beta.0",
161+
"@jupyterlab/markedparser-extension": "~4.2.0-beta.0",
162+
"@jupyterlab/mathjax-extension": "~4.2.0-beta.0",
163+
"@jupyterlab/mermaid-extension": "~4.2.0-beta.0",
164+
"@jupyterlab/metadataform-extension": "~4.2.0-beta.0",
165+
"@jupyterlab/notebook-extension": "~4.2.0-beta.0",
166+
"@jupyterlab/pdf-extension": "~4.2.0-beta.0",
167+
"@jupyterlab/pluginmanager-extension": "~4.2.0-beta.0",
168+
"@jupyterlab/running-extension": "~4.2.0-beta.0",
169+
"@jupyterlab/settingeditor": "~4.2.0-beta.0",
170+
"@jupyterlab/settingeditor-extension": "~4.2.0-beta.0",
171+
"@jupyterlab/shortcuts-extension": "~5.0.0-beta.0",
172+
"@jupyterlab/terminal-extension": "~4.2.0-beta.0",
173+
"@jupyterlab/theme-dark-extension": "~4.2.0-beta.0",
174+
"@jupyterlab/theme-light-extension": "~4.2.0-beta.0",
175+
"@jupyterlab/toc-extension": "~6.2.0-beta.0",
176+
"@jupyterlab/tooltip-extension": "~4.2.0-beta.0",
177+
"@jupyterlab/translation-extension": "~4.2.0-beta.0",
178+
"@jupyterlab/ui-components-extension": "~4.2.0-beta.0",
179+
"@jupyterlab/vega5-extension": "~4.2.0-beta.0",
180180
"react": "^18.2.0",
181181
"react-dom": "^18.2.0",
182182
"yjs": "^13.5.40"
183183
},
184184
"devDependencies": {
185-
"@jupyterlab/builder": "~4.2.0-alpha.2",
186-
"@jupyterlab/buildutils": "~4.2.0-alpha.2",
185+
"@jupyterlab/builder": "~4.2.0-beta.0",
186+
"@jupyterlab/buildutils": "~4.2.0-beta.0",
187187
"@types/rimraf": "^3.0.2",
188188
"css-loader": "~5.0.1",
189189
"extra-watch-webpack-plugin": "^1.0.3",
@@ -247,6 +247,7 @@
247247
"@jupyterlab/completer-extension:manager"
248248
],
249249
"@jupyterlab/console-extension": [
250+
"@jupyterlab/console-extension:cell-executor",
250251
"@jupyterlab/console-extension:completer",
251252
"@jupyterlab/console-extension:factory",
252253
"@jupyterlab/console-extension:foreign",
@@ -282,6 +283,7 @@
282283
"@jupyterlab/mathjax-extension": true,
283284
"@jupyterlab/mermaid-extension": true,
284285
"@jupyterlab/notebook-extension": [
286+
"@jupyterlab/notebook-extension:cell-executor",
285287
"@jupyterlab/notebook-extension:code-console",
286288
"@jupyterlab/notebook-extension:export",
287289
"@jupyterlab/notebook-extension:factory",

buildutils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"watch": "tsc -w --listEmittedFiles"
3030
},
3131
"dependencies": {
32-
"@jupyterlab/buildutils": "~4.2.0-alpha.2",
32+
"@jupyterlab/buildutils": "~4.2.0-beta.0",
3333
"commander": "^6.2.0",
3434
"fs-extra": "^9.1.0",
3535
"typescript": "~5.0.2"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"yjs": "^13.5.40"
5050
},
5151
"devDependencies": {
52-
"@jupyterlab/buildutils": "~4.2.0-alpha.2",
52+
"@jupyterlab/buildutils": "~4.2.0-beta.0",
5353
"@typescript-eslint/eslint-plugin": "^5.55.0",
5454
"@typescript-eslint/parser": "^5.55.0",
5555
"eslint": "^8.36.0",

packages/application-extension/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@
4040
"dependencies": {
4141
"@jupyter-notebook/application": "^7.2.0-alpha.0",
4242
"@jupyter-notebook/ui-components": "^7.2.0-alpha.0",
43-
"@jupyterlab/application": "~4.2.0-alpha.2",
44-
"@jupyterlab/apputils": "~4.3.0-alpha.2",
45-
"@jupyterlab/codeeditor": "~4.2.0-alpha.2",
46-
"@jupyterlab/console": "~4.2.0-alpha.2",
47-
"@jupyterlab/coreutils": "~6.2.0-alpha.2",
48-
"@jupyterlab/docmanager": "~4.2.0-alpha.2",
49-
"@jupyterlab/docregistry": "~4.2.0-alpha.2",
50-
"@jupyterlab/mainmenu": "~4.2.0-alpha.2",
51-
"@jupyterlab/rendermime": "~4.2.0-alpha.2",
52-
"@jupyterlab/settingregistry": "~4.2.0-alpha.2",
53-
"@jupyterlab/translation": "~4.2.0-alpha.2",
43+
"@jupyterlab/application": "~4.2.0-beta.0",
44+
"@jupyterlab/apputils": "~4.3.0-beta.0",
45+
"@jupyterlab/codeeditor": "~4.2.0-beta.0",
46+
"@jupyterlab/console": "~4.2.0-beta.0",
47+
"@jupyterlab/coreutils": "~6.2.0-beta.0",
48+
"@jupyterlab/docmanager": "~4.2.0-beta.0",
49+
"@jupyterlab/docregistry": "~4.2.0-beta.0",
50+
"@jupyterlab/mainmenu": "~4.2.0-beta.0",
51+
"@jupyterlab/rendermime": "~4.2.0-beta.0",
52+
"@jupyterlab/settingregistry": "~4.2.0-beta.0",
53+
"@jupyterlab/translation": "~4.2.0-beta.0",
5454
"@lumino/coreutils": "^2.1.2",
5555
"@lumino/disposable": "^2.1.2",
5656
"@lumino/widgets": "^2.3.2"

packages/application/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242
"watch": "tsc -b --watch"
4343
},
4444
"dependencies": {
45-
"@jupyterlab/application": "~4.2.0-alpha.2",
46-
"@jupyterlab/coreutils": "~6.2.0-alpha.2",
47-
"@jupyterlab/docregistry": "~4.2.0-alpha.2",
48-
"@jupyterlab/rendermime-interfaces": "~3.10.0-alpha.2",
49-
"@jupyterlab/ui-components": "~4.2.0-alpha.2",
45+
"@jupyterlab/application": "~4.2.0-beta.0",
46+
"@jupyterlab/coreutils": "~6.2.0-beta.0",
47+
"@jupyterlab/docregistry": "~4.2.0-beta.0",
48+
"@jupyterlab/rendermime-interfaces": "~3.10.0-beta.0",
49+
"@jupyterlab/ui-components": "~4.2.0-beta.0",
5050
"@lumino/algorithm": "^2.0.1",
5151
"@lumino/coreutils": "^2.1.2",
5252
"@lumino/messaging": "^2.0.1",
@@ -57,7 +57,7 @@
5757
"devDependencies": {
5858
"@babel/core": "^7.11.6",
5959
"@babel/preset-env": "^7.12.1",
60-
"@jupyterlab/testutils": "~4.2.0-alpha.2",
60+
"@jupyterlab/testutils": "~4.2.0-beta.0",
6161
"@types/jest": "^29.2.5",
6262
"jest": "^29.3.1",
6363
"rimraf": "^3.0.2",

packages/application/src/shell.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ import { find } from '@lumino/algorithm';
99
import { JSONExt, PromiseDelegate, Token } from '@lumino/coreutils';
1010
import { ISignal, Signal } from '@lumino/signaling';
1111

12-
import { BoxLayout, Panel, SplitPanel, Widget } from '@lumino/widgets';
12+
import {
13+
BoxLayout,
14+
FocusTracker,
15+
Panel,
16+
SplitPanel,
17+
Widget,
18+
} from '@lumino/widgets';
1319
import { PanelHandler, SidePanelHandler } from './panelhandler';
1420

1521
/**
@@ -163,7 +169,10 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
163169
/**
164170
* A signal emitted when the current widget changes.
165171
*/
166-
get currentChanged(): ISignal<NotebookShell, void> {
172+
get currentChanged(): ISignal<
173+
JupyterFrontEnd.IShell,
174+
FocusTracker.IChangedArgs<Widget>
175+
> {
167176
return this._currentChanged;
168177
}
169178

@@ -314,16 +323,21 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
314323
case 'menu':
315324
return this._menuHandler.addWidget(widget, rank);
316325
case 'main':
317-
case undefined:
326+
case undefined: {
318327
if (this._main.widgets.length > 0) {
319328
// do not add the widget if there is already one
320329
return;
321330
}
331+
const previousWidget = this.currentWidget;
322332
this._main.addWidget(widget);
323333
this._main.update();
324-
this._currentChanged.emit(void 0);
334+
this._currentChanged.emit({
335+
newValue: widget,
336+
oldValue: previousWidget,
337+
});
325338
this._mainWidgetLoaded.resolve();
326339
break;
340+
}
327341
case 'left':
328342
return this._leftHandler.addWidget(widget, rank);
329343
case 'right':
@@ -429,7 +443,9 @@ export class NotebookShell extends Widget implements JupyterFrontEnd.IShell {
429443
private _skipLinkWidgetHandler: Private.SkipLinkWidgetHandler;
430444
private _main: Panel;
431445
private _translator: ITranslator = nullTranslator;
432-
private _currentChanged = new Signal<this, void>(this);
446+
private _currentChanged = new Signal<this, FocusTracker.IChangedArgs<Widget>>(
447+
this
448+
);
433449
private _mainWidgetLoaded = new PromiseDelegate<void>();
434450
private _userLayout: INotebookShell.IUserLayout;
435451
}

packages/console-extension/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
},
4040
"dependencies": {
4141
"@jupyter-notebook/application": "^7.2.0-alpha.0",
42-
"@jupyterlab/application": "~4.2.0-alpha.2",
43-
"@jupyterlab/console": "~4.2.0-alpha.2",
44-
"@jupyterlab/coreutils": "~6.2.0-alpha.2",
42+
"@jupyterlab/application": "~4.2.0-beta.0",
43+
"@jupyterlab/console": "~4.2.0-beta.0",
44+
"@jupyterlab/coreutils": "~6.2.0-beta.0",
4545
"@lumino/algorithm": "^2.0.1"
4646
},
4747
"devDependencies": {

packages/docmanager-extension/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
},
4040
"dependencies": {
4141
"@jupyter-notebook/application": "^7.2.0-alpha.0",
42-
"@jupyterlab/application": "~4.2.0-alpha.2",
43-
"@jupyterlab/coreutils": "~6.2.0-alpha.2",
44-
"@jupyterlab/docmanager": "~4.2.0-alpha.2",
45-
"@jupyterlab/docregistry": "~4.2.0-alpha.2",
46-
"@jupyterlab/services": "~7.2.0-alpha.2",
42+
"@jupyterlab/application": "~4.2.0-beta.0",
43+
"@jupyterlab/coreutils": "~6.2.0-beta.0",
44+
"@jupyterlab/docmanager": "~4.2.0-beta.0",
45+
"@jupyterlab/docregistry": "~4.2.0-beta.0",
46+
"@jupyterlab/services": "~7.2.0-beta.0",
4747
"@lumino/algorithm": "^2.0.1",
4848
"@lumino/signaling": "^2.1.2"
4949
},

0 commit comments

Comments
 (0)