File tree 2 files changed +15
-1
lines changed
packages/application-extension
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 55
55
"@jupyterlab/translation" : " ^4.0.0-alpha.14" ,
56
56
"@lumino/coreutils" : " ^2.0.0-alpha.6" ,
57
57
"@lumino/disposable" : " ^2.0.0-alpha.6" ,
58
+ "@lumino/messaging" : " ^2.0.0-alpha.6" ,
58
59
"@lumino/widgets" : " ^2.0.0-alpha.6"
59
60
},
60
61
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ import {
50
50
IDisposable
51
51
} from '@lumino/disposable' ;
52
52
53
+ import { MessageLoop } from '@lumino/messaging' ;
54
+
53
55
import { Menu , Widget } from '@lumino/widgets' ;
54
56
55
57
import { SideBarPalette } from './sidebarpalette' ;
@@ -201,7 +203,7 @@ const opener: JupyterFrontEndPlugin<void> = {
201
203
// TODO: fix upstream?
202
204
await settingRegistry ?. load ( '@jupyterlab/notebook-extension:panel' ) ;
203
205
204
- await new Promise ( async ( ) => {
206
+ await new Promise ( async ( resolve , reject ) => {
205
207
// TODO: get factory from file type instead?
206
208
if ( ext === '.ipynb' ) {
207
209
docManager . open ( file , NOTEBOOK_FACTORY , undefined , {
@@ -212,7 +214,18 @@ const opener: JupyterFrontEndPlugin<void> = {
212
214
ref : '_noref'
213
215
} ) ;
214
216
}
217
+ resolve ( void 0 ) ;
215
218
} ) ;
219
+
220
+ // force triggering a resize event to try fixing toolbar rendering issues:
221
+ // https://github.com/jupyter/notebook/issues/6553
222
+ const currentWidget = app . shell . currentWidget ;
223
+ if ( currentWidget ) {
224
+ MessageLoop . sendMessage (
225
+ currentWidget ,
226
+ Widget . ResizeMessage . UnknownSize
227
+ ) ;
228
+ }
216
229
}
217
230
} ) ;
218
231
You can’t perform that action at this time.
0 commit comments