@@ -41,17 +41,16 @@ import { ITranslator, nullTranslator, TranslationBundle } from '@jupyterlab/tran
41
41
42
42
import { Menu , MenuBar } from '@lumino/widgets' ;
43
43
44
- import { IAwareness , ISharedNotebook , ISuggestions , NotebookChange } from '@jupyter/ydoc' ;
44
+ import { IAwareness , ISharedNotebook , NotebookChange } from '@jupyter/ydoc' ;
45
45
46
46
import {
47
47
CollaboratorsPanel ,
48
- SuggestionsPanel ,
49
48
IGlobalAwareness ,
50
49
IUserMenu ,
51
50
remoteUserCursors ,
52
51
RendererUserMenu ,
53
52
UserInfoPanel ,
54
- UserMenu ,
53
+ UserMenu
55
54
} from '@jupyter/collaboration' ;
56
55
57
56
import * as Y from 'yjs' ;
@@ -148,12 +147,11 @@ export const rtcPanelPlugin: JupyterFrontEndPlugin<void> = {
148
147
id : '@jupyter/collaboration-extension:rtcPanel' ,
149
148
description : 'Add side panel to display all currently connected users.' ,
150
149
autoStart : true ,
151
- requires : [ IGlobalAwareness , ISuggestions ] ,
150
+ requires : [ IGlobalAwareness ] ,
152
151
optional : [ ITranslator ] ,
153
152
activate : (
154
153
app : JupyterFrontEnd ,
155
154
awareness : Awareness ,
156
- suggestions : ISuggestions ,
157
155
translator : ITranslator | null
158
156
) : void => {
159
157
const { user } = app . serviceManager ;
@@ -185,10 +183,6 @@ export const rtcPanelPlugin: JupyterFrontEndPlugin<void> = {
185
183
) ;
186
184
collaboratorsPanel . title . label = trans . __ ( 'Online Collaborators' ) ;
187
185
userPanel . addWidget ( collaboratorsPanel ) ;
188
-
189
- const suggestionsPanel = new SuggestionsPanel ( fileopener , suggestions ) ;
190
- suggestionsPanel . title . label = trans . __ ( 'Suggestions' ) ;
191
- userPanel . addWidget ( suggestionsPanel ) ;
192
186
}
193
187
} ;
194
188
@@ -306,8 +300,6 @@ export class EditingModeExtension implements DocumentRegistry.IWidgetExtension<N
306
300
reviewCommands . addCommand ( 'merge' , {
307
301
label : 'Merge' ,
308
302
execute : ( ) => {
309
- console . log ( 'currentRoomId' , context . model . sharedModel . currentRoomId ) ;
310
- console . log ( 'rootRoomId' , context . model . sharedModel . rootRoomId ) ;
311
303
requestDocMerge ( context . model . sharedModel . currentRoomId , context . model . sharedModel . rootRoomId ) ;
312
304
}
313
305
} ) ;
@@ -396,42 +388,3 @@ export class EditingModeExtension implements DocumentRegistry.IWidgetExtension<N
396
388
} ) ;
397
389
}
398
390
}
399
-
400
- /**
401
- * A plugin to provide shared document suggestions.
402
- */
403
- export const suggestions : JupyterFrontEndPlugin < ISuggestions > = {
404
- id : '@jupyter/collaboration-extension:rtcGlobalSuggestions' ,
405
- description : 'A plugin to provide shared document suggestions.' ,
406
- autoStart : true ,
407
- provides : ISuggestions ,
408
- activate : ( app : JupyterFrontEnd ) : ISuggestions => {
409
- console . log ( 'suggestions plugin activated' ) ;
410
- return new Suggestions ( ) ;
411
- } ,
412
- } ;
413
-
414
- export class Suggestions implements ISuggestions {
415
- private _forkIds : string [ ] ;
416
- private _callbacks : any [ ] ;
417
-
418
- constructor ( ) {
419
- this . _forkIds = [ ] ;
420
- this . _callbacks = [ ] ;
421
- }
422
-
423
- addFork ( forkId : string ) {
424
- this . _forkIds . push ( forkId ) ;
425
- for ( const callback of this . _callbacks ) {
426
- callback ( forkId ) ;
427
- }
428
- }
429
-
430
- addCallback ( callback : any ) {
431
- this . _callbacks . push ( callback ) ;
432
- }
433
-
434
- get forks ( ) : string [ ] {
435
- return this . _forkIds ;
436
- }
437
- }
0 commit comments