Skip to content

Commit

Permalink
Fix shell pollution by third party extension (#21)
Browse files Browse the repository at this point in the history
* Fix shell pollution by third party extension

* Real fix
  • Loading branch information
fcollonval authored Feb 26, 2023
1 parent 7b3146a commit 3b08262
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/application/src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { BoxLayout, Widget } from '@lumino/widgets';
/**
* The Rise application shell token.
*/
export const IRetroShell = new Token<RiseShell>(
export const IRiseShell = new Token<RiseShell>(
'jupyterlab-rise-application:IRiseShell'
);

Expand Down Expand Up @@ -60,8 +60,9 @@ export class RiseShell extends Widget implements JupyterFrontEnd.IShell {
area?: string,
options?: DocumentRegistry.IOpenOptions
): void {
if ((this.layout as BoxLayout).widgets.length > 0) {
// pass no-op
if ((this.layout as BoxLayout).widgets.length > 0 || area !== 'rise') {
// Bail
return;
}
BoxLayout.setStretch(widget, 1);
(this.layout as BoxLayout).addWidget(widget);
Expand Down
2 changes: 1 addition & 1 deletion packages/application/src/plugins/rise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const plugin: JupyterFrontEndPlugin<void> = {
// notebookPanel.toolbar.dispose();
notebookPanel.toolbar.hide();

app.shell.add(notebookPanel);
app.shell.add(notebookPanel, 'rise');
});
}
};
Expand Down

0 comments on commit 3b08262

Please sign in to comment.