Skip to content

Commit 3b08262

Browse files
authored
Fix shell pollution by third party extension (#21)
* Fix shell pollution by third party extension * Real fix
1 parent 7b3146a commit 3b08262

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/application/src/app/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { BoxLayout, Widget } from '@lumino/widgets';
1515
/**
1616
* The Rise application shell token.
1717
*/
18-
export const IRetroShell = new Token<RiseShell>(
18+
export const IRiseShell = new Token<RiseShell>(
1919
'jupyterlab-rise-application:IRiseShell'
2020
);
2121

@@ -60,8 +60,9 @@ export class RiseShell extends Widget implements JupyterFrontEnd.IShell {
6060
area?: string,
6161
options?: DocumentRegistry.IOpenOptions
6262
): void {
63-
if ((this.layout as BoxLayout).widgets.length > 0) {
64-
// pass no-op
63+
if ((this.layout as BoxLayout).widgets.length > 0 || area !== 'rise') {
64+
// Bail
65+
return;
6566
}
6667
BoxLayout.setStretch(widget, 1);
6768
(this.layout as BoxLayout).addWidget(widget);

packages/application/src/plugins/rise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export const plugin: JupyterFrontEndPlugin<void> = {
146146
// notebookPanel.toolbar.dispose();
147147
notebookPanel.toolbar.hide();
148148

149-
app.shell.add(notebookPanel);
149+
app.shell.add(notebookPanel, 'rise');
150150
});
151151
}
152152
};

0 commit comments

Comments
 (0)