Skip to content

Commit c6cb137

Browse files
Always display peer name (#362)
* Custom username span * Use tooltip to display remote user name * Automatic application of license header --------- Co-authored-by: Frédéric Collonval <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent fd95ae8 commit c6cb137

File tree

4 files changed

+474
-6
lines changed

4 files changed

+474
-6
lines changed

packages/react/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@
6464
},
6565
"dependencies": {
6666
"@codemirror/lang-python": "^6.0.1",
67+
"@codemirror/state": "^6.2.0",
68+
"@codemirror/view": "^6.7.0",
6769
"@datalayer/primer-addons": "^0.3.2",
6870
"@jupyter-widgets/base": "^6.0.0",
6971
"@jupyter-widgets/controls": "^5.0.0",
7072
"@jupyter-widgets/html-manager": "^1.0.0",
7173
"@jupyter-widgets/jupyterlab-manager": "^5.0.0",
7274
"@jupyter-widgets/output": "^6.0.0",
73-
"@jupyter/collaboration": "^3.1.0",
7475
"@jupyter/web-components": "^0.15.3",
7576
"@jupyter/ydoc": "3.0.2",
7677
"@jupyterlab/application": "^4.0.0",
@@ -149,7 +150,9 @@
149150
"usehooks-ts": "^2.9.1",
150151
"utf-8-validate": "^6.0.3",
151152
"wildcard-match": "^5.1.2",
153+
"y-protocols": "^1.0.5",
152154
"y-websocket": "^2.1.0",
155+
"yjs": "^13.5.40",
153156
"zustand": "^4.4.1"
154157
},
155158
"devDependencies": {

packages/react/src/components/notebook/BaseNotebook.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* MIT License
55
*/
66

7-
import { type ISharedNotebook, type IYText, YNotebook } from '@jupyter/ydoc';
7+
import { YNotebook, type ISharedNotebook, type IYText } from '@jupyter/ydoc';
88
import type { ISessionContext } from '@jupyterlab/apputils';
99
import type { Cell, CodeCell, ICellModel } from '@jupyterlab/cells';
1010
import { type IEditorServices } from '@jupyterlab/codeeditor';
@@ -73,12 +73,11 @@ import {
7373
WidgetManager,
7474
} from '../../jupyter';
7575
import type { OnSessionConnection } from '../../state';
76-
import { newUuid } from '../../utils';
76+
import { newUuid, remoteUserCursors } from '../../utils';
7777
import { Lumino } from '../lumino';
7878
import { Loader } from '../utils';
7979
import type { DatalayerNotebookExtension } from './Notebook';
8080
import addNotebookCommands from './NotebookCommands';
81-
import { remoteUserCursors } from '@jupyter/collaboration';
8281

8382
const COMPLETER_TIMEOUT_MILLISECONDS = 1000;
8483
const DEFAULT_EXTENSIONS = new Array<DatalayerNotebookExtension>();
@@ -917,8 +916,8 @@ class CommonFeatures {
917916
return EditorExtensionRegistry.createImmutableExtension(
918917
remoteUserCursors({ awareness, ytext })
919918
);
920-
}
921-
})
919+
},
920+
});
922921

923922
const factoryService = new CodeMirrorEditorFactory({
924923
extensions: editorExtensions,

0 commit comments

Comments
 (0)