diff --git a/packages/collaboration-extension/package.json b/packages/collaboration-extension/package.json index 79f3e85e..48892c27 100644 --- a/packages/collaboration-extension/package.json +++ b/packages/collaboration-extension/package.json @@ -55,7 +55,7 @@ "dependencies": { "@jupyter/collaboration": "^2.1.4", "@jupyter/docprovider": "^2.1.4", - "@jupyter/ydoc": "^1.1.0-a0", + "@jupyter/ydoc": "^1.1.0 || ^2.0.0", "@jupyterlab/application": "^4.0.5", "@jupyterlab/apputils": "^4.0.5", "@jupyterlab/codemirror": "^4.0.5", diff --git a/packages/collaboration/src/collaboratorspanel.tsx b/packages/collaboration/src/collaboratorspanel.tsx index d234b9b7..eed42e1d 100644 --- a/packages/collaboration/src/collaboratorspanel.tsx +++ b/packages/collaboration/src/collaboratorspanel.tsx @@ -75,6 +75,7 @@ export class CollaboratorsPanel extends Panel { state.forEach((value: ICollaboratorAwareness, key: any) => { if ( this._currentUser.isReady && + value.user && value.user.username !== this._currentUser.identity!.username ) { collaborators.push(value); @@ -114,6 +115,10 @@ export class CollaboratorsBody extends ReactWidget { let separator = ''; let currentFileLocation = ''; + if (!value.user) { + return <>; + } + if (value.current) { canOpenCurrent = true; const path = value.current.split(':'); diff --git a/packages/collaboration/src/tokens.ts b/packages/collaboration/src/tokens.ts index 5f717390..5d84ad00 100644 --- a/packages/collaboration/src/tokens.ts +++ b/packages/collaboration/src/tokens.ts @@ -84,7 +84,7 @@ export interface ICollaboratorAwareness { /** * The User owning theses data. */ - user: User.IIdentity; + user?: User.IIdentity; /** * The current file/context the user is working on. diff --git a/packages/docprovider/package.json b/packages/docprovider/package.json index 1990a83f..56a26154 100644 --- a/packages/docprovider/package.json +++ b/packages/docprovider/package.json @@ -41,7 +41,7 @@ "watch": "tsc -b --watch" }, "dependencies": { - "@jupyter/ydoc": "^1.1.0-a0", + "@jupyter/ydoc": "^1.1.0 || ^2.0.0", "@jupyterlab/coreutils": "^6.0.5", "@jupyterlab/services": "^7.0.5", "@lumino/coreutils": "^2.1.0", diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-guest-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-guest-linux.png index 45b6c454..9bc99100 100644 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-guest-linux.png and b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-guest-linux.png differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-host-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-host-linux.png index 45b6c454..6a51faf6 100644 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-host-linux.png and b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-create-notebook-host-linux.png differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-guest-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-guest-linux.png index b5e25f01..dd932db3 100644 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-guest-linux.png and b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-guest-linux.png differ diff --git a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-host-linux.png b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-host-linux.png index b5e25f01..dd932db3 100644 Binary files a/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-host-linux.png and b/ui-tests/tests/notebook.spec.ts-snapshots/initialization-open-notebook-host-linux.png differ diff --git a/yarn.lock b/yarn.lock index d3843e6f..741b001c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1503,21 +1503,7 @@ __metadata: languageName: node linkType: hard -"@codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0, @codemirror/language@npm:^6.4.0, @codemirror/language@npm:^6.6.0": - version: 6.6.0 - resolution: "@codemirror/language@npm:6.6.0" - dependencies: - "@codemirror/state": ^6.0.0 - "@codemirror/view": ^6.0.0 - "@lezer/common": ^1.0.0 - "@lezer/highlight": ^1.0.0 - "@lezer/lr": ^1.0.0 - style-mod: ^4.0.0 - checksum: bb9411620e2f231653a3f0c4429e0d19a3843bff5dbc117df4649d7bf783ec4ad809c0add8bc0887a4ec3f48b4f8f941621168e47d76101d5383f0d670af1722 - languageName: node - linkType: hard - -"@codemirror/language@npm:^6.8.0": +"@codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0, @codemirror/language@npm:^6.4.0, @codemirror/language@npm:^6.6.0, @codemirror/language@npm:^6.8.0": version: 6.9.0 resolution: "@codemirror/language@npm:6.9.0" dependencies: @@ -2035,7 +2021,7 @@ __metadata: dependencies: "@jupyter/collaboration": ^2.1.4 "@jupyter/docprovider": ^2.1.4 - "@jupyter/ydoc": ^1.1.0-a0 + "@jupyter/ydoc": ^1.1.0 || ^2.0.0 "@jupyterlab/application": ^4.0.5 "@jupyterlab/apputils": ^4.0.5 "@jupyterlab/builder": ^4.0.5 @@ -2090,7 +2076,7 @@ __metadata: version: 0.0.0-use.local resolution: "@jupyter/docprovider@workspace:packages/docprovider" dependencies: - "@jupyter/ydoc": ^1.1.0-a0 + "@jupyter/ydoc": ^1.1.0 || ^2.0.0 "@jupyterlab/coreutils": ^6.0.5 "@jupyterlab/services": ^7.0.5 "@jupyterlab/testing": ^4.0.5 @@ -2144,9 +2130,9 @@ __metadata: languageName: node linkType: hard -"@jupyter/ydoc@npm:^1.1.0-a0": - version: 1.1.0-a0 - resolution: "@jupyter/ydoc@npm:1.1.0-a0" +"@jupyter/ydoc@npm:^1.1.0 || ^2.0.0": + version: 2.1.3 + resolution: "@jupyter/ydoc@npm:2.1.3" dependencies: "@jupyterlab/nbformat": ^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0 "@lumino/coreutils": ^1.11.0 || ^2.0.0 @@ -2154,7 +2140,7 @@ __metadata: "@lumino/signaling": ^1.10.0 || ^2.0.0 y-protocols: ^1.0.5 yjs: ^13.5.40 - checksum: 0099bacb2884a460867658e7f5a944e4d6eca7c4d3d68a6b31102be77d8fc9b6ba162af55c20f81c70f7fef4e9d9329eee4da32063c0caa0c6e3f10a488f95b5 + checksum: 61b38e3f89accebc8060eb0aacc11bf812befb9b1cec085d1b0153be851037a3a26b5576d58e5bc65d8c0697ef9f1e535afa73af1b1deef0523d749ff4ac0ac9 languageName: node linkType: hard @@ -2544,16 +2530,7 @@ __metadata: languageName: node linkType: hard -"@jupyterlab/nbformat@npm:^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0": - version: 4.0.0 - resolution: "@jupyterlab/nbformat@npm:4.0.0" - dependencies: - "@lumino/coreutils": ^2.1.1 - checksum: 152da6b9622c7683543ad2bd9525857a8a39b4b8a5474998e921232f108c366dd8625daeb14e2cc2aa8aac124b9a5d16f285310cd241c9769d51af80730dbd59 - languageName: node - linkType: hard - -"@jupyterlab/nbformat@npm:^4.0.5": +"@jupyterlab/nbformat@npm:^3.0.0 || ^4.0.0-alpha.21 || ^4.0.0, @jupyterlab/nbformat@npm:^4.0.5": version: 4.0.5 resolution: "@jupyterlab/nbformat@npm:4.0.5" dependencies: @@ -3110,7 +3087,7 @@ __metadata: languageName: node linkType: hard -"@lumino/coreutils@npm:^1.11.0 || ^2.0.0, @lumino/coreutils@npm:^1.11.0 || ^2.1.2, @lumino/coreutils@npm:^2.1.0, @lumino/coreutils@npm:^2.1.1, @lumino/coreutils@npm:^2.1.2": +"@lumino/coreutils@npm:^1.11.0 || ^2.0.0, @lumino/coreutils@npm:^1.11.0 || ^2.1.2, @lumino/coreutils@npm:^2.1.0, @lumino/coreutils@npm:^2.1.2": version: 2.1.2 resolution: "@lumino/coreutils@npm:2.1.2" checksum: 7865317ac0676b448d108eb57ab5d8b2a17c101995c0f7a7106662d9fe6c859570104525f83ee3cda12ae2e326803372206d6f4c1f415a5b59e4158a7b81066f @@ -4028,18 +4005,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^18.0.26, @types/react@npm:^18.0.27": - version: 18.2.6 - resolution: "@types/react@npm:18.2.6" - dependencies: - "@types/prop-types": "*" - "@types/scheduler": "*" - csstype: ^3.0.2 - checksum: dea9d232d8df7ac357367a69dcb557711ab3d5501807ffa77cebeee73d49ee94d095f298e36853c63ed47cce097eee4c7eae2aaa8c02fac3f0171ec1b523a819 - languageName: node - linkType: hard - -"@types/react@npm:~18.0.26": +"@types/react@npm:^18.0.26, @types/react@npm:^18.0.27, @types/react@npm:~18.0.26": version: 18.0.38 resolution: "@types/react@npm:18.0.38" dependencies: