Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shell pollution by third party extension #21

Merged
merged 2 commits into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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