Skip to content

Commit e3d0921

Browse files
committed
Include the users item widget to the collaborative chat toolbar
1 parent 1a3d918 commit e3d0921

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

packages/jupyterlab-chat-extension/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
},
4949
"dependencies": {
5050
"@jupyter-notebook/application": "^7.2.0",
51+
"@jupyter/collaboration": "^3.1.1",
5152
"@jupyter/collaborative-drive": "^3.0.0",
5253
"@jupyter/ydoc": "^2.0.0 || ^3.0.0",
5354
"@jupyterlab/application": "^4.2.0",

packages/jupyterlab-chat-extension/schema/chat-panel.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
{
1212
"name": "markAsRead",
1313
"command": "jupyterlab-chat:markAsRead"
14-
}
14+
},
15+
{ "name": "spacer", "type": "spacer", "rank": 100 },
16+
{ "name": "usersItem", "rank": 150 }
1517
]
1618
},
1719
"properties": {},

packages/jupyterlab-chat-extension/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
chatIcon,
2121
readIcon
2222
} from '@jupyter/chat';
23+
import { UsersItem } from '@jupyter/collaboration';
2324
import {
2425
ICollaborativeDrive,
2526
SharedDocumentFactory
@@ -240,6 +241,11 @@ const docFactories: JupyterFrontEndPlugin<IChatFactory> = {
240241
pluginIds.docFactories,
241242
translator
242243
);
244+
toolbarRegistry.addFactory<CollaborativeChatPanel>(
245+
FACTORY,
246+
'usersItem',
247+
panel => UsersItem.createWidget({ model: panel.model })
248+
);
243249
}
244250

245251
// Wait for the application to be restored and

packages/jupyterlab-chat-extension/style/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
*/
1111

1212
@import url('~jupyterlab-chat/style/index.css');
13+
@import url('@jupyter/collaboration/style/index.css');

0 commit comments

Comments
 (0)