diff --git a/packages/application-extension/src/index.ts b/packages/application-extension/src/index.ts index 9ccbe5d01..afc73161c 100644 --- a/packages/application-extension/src/index.ts +++ b/packages/application-extension/src/index.ts @@ -28,8 +28,6 @@ import { DocumentWidget } from '@jupyterlab/docregistry'; import { IMainMenu } from '@jupyterlab/mainmenu'; -import { INotebookTools } from '@jupyterlab/notebook'; - import { ISettingRegistry } from '@jupyterlab/settingregistry'; import { ITranslator } from '@jupyterlab/translation'; @@ -603,15 +601,14 @@ const topVisibility: JupyterFrontEndPlugin = { const sidebarVisibility: JupyterFrontEndPlugin = { id: '@jupyter-notebook/application-extension:sidebar', requires: [INotebookShell, ITranslator], - optional: [IMainMenu, ICommandPalette, INotebookTools], + optional: [IMainMenu, ICommandPalette], autoStart: true, activate: ( app: JupyterFrontEnd, notebookShell: INotebookShell, translator: ITranslator, menu: IMainMenu | null, - palette: ICommandPalette | null, - notebookTools: INotebookTools | null + palette: ICommandPalette | null ) => { if (!sidePanelsEnabled()) { return; @@ -619,7 +616,7 @@ const sidebarVisibility: JupyterFrontEndPlugin = { const trans = translator.load('notebook'); - var sideBarMenu: SideBarPanel.sideBarMenu = { + const sideBarMenu: SideBarPanel.sideBarMenu = { left: null, right: null }; diff --git a/packages/application/src/shell.ts b/packages/application/src/shell.ts index b9477ec7b..d97f03f8a 100644 --- a/packages/application/src/shell.ts +++ b/packages/application/src/shell.ts @@ -3,7 +3,7 @@ import { JupyterFrontEnd } from '@jupyterlab/application'; import { DocumentRegistry } from '@jupyterlab/docregistry'; -import { closeIcon, LabIcon, ReactWidget } from '@jupyterlab/ui-components'; +import { closeIcon } from '@jupyterlab/ui-components'; import { ArrayExt, find } from '@lumino/algorithm'; import { PromiseDelegate, Token } from '@lumino/coreutils'; @@ -19,7 +19,6 @@ import { StackedPanel, Widget } from '@lumino/widgets'; -import React from 'react'; /** * The Jupyter Notebook application shell token. @@ -420,22 +419,19 @@ export class SideBarHandler { this._widgetPanel = new StackedPanel(); this._widgetPanel.widgetRemoved.connect(this._onWidgetRemoved, this); - const that = this; - const collapseIcon = React.createElement( - 'div', - { - onClick: () => { - that.collapse(); - that.hide(); - } - }, - LabIcon.resolveReact({ - icon: closeIcon, - className: 'jp-SidePanel-collapse' - }) - ); - - this._panel.addWidget(ReactWidget.create(collapseIcon)); + const closeButton = document.createElement('button'); + closeIcon.element({ + container: closeButton, + height: '16px', + width: 'auto' + }); + closeButton.onclick = () => { + this.collapse(); + this.hide(); + }; + closeButton.className = 'jp-Button jp-SidePanel-collapse'; + const icon = new Widget({ node: closeButton }); + this._panel.addWidget(icon); this._panel.addWidget(this._widgetPanel); } diff --git a/packages/application/style/sidepanel.css b/packages/application/style/sidepanel.css index cb8f7058c..8acb70766 100644 --- a/packages/application/style/sidepanel.css +++ b/packages/application/style/sidepanel.css @@ -17,10 +17,6 @@ | SideBar |----------------------------------------------------------------------------*/ -/* Left */ - -/* Right */ - /* Stack panels */ #jp-right-stack, @@ -30,14 +26,6 @@ min-width: var(--jp-sidebar-min-width); } -#jp-right-stack { - border-left: var(--jp-border-width) solid var(--jp-border-color1); -} - -#jp-left-stack { - border-right: var(--jp-border-width) solid var(--jp-border-color1); -} - #jp-left-stack .jp-SidePanel-collapse, #jp-right-stack .jp-SidePanel-collapse { display: flex; @@ -48,6 +36,10 @@ justify-content: right; } +#jp-right-stack .jp-SidePanel-collapse { + justify-content: left; +} + #jp-left-stack .lm-StackedPanel, #jp-right-stack .lm-StackedPanel { flex: 1 1 auto; diff --git a/packages/notebook-extension/src/index.ts b/packages/notebook-extension/src/index.ts index ae42471ae..22b7597c0 100644 --- a/packages/notebook-extension/src/index.ts +++ b/packages/notebook-extension/src/index.ts @@ -337,8 +337,7 @@ const scrollOutput: JupyterFrontEndPlugin = { const notebookToolsWidget: JupyterFrontEndPlugin = { id: '@jupyter-notebook/notebook-extension:notebook-tools', autoStart: true, - requires: [INotebookShell], - optional: [INotebookTools], + requires: [INotebookShell, INotebookTools], activate: ( app: JupyterFrontEnd, shell: INotebookShell,