From 728c1eda83203b3f6980386e0839a9f6609e9a69 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 13 Aug 2020 07:55:19 -0700 Subject: [PATCH] avoid top toolbar overflow --- src/vs/workbench/contrib/notebook/browser/media/notebook.css | 4 ++++ .../contrib/notebook/browser/notebookEditorWidget.ts | 1 + src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts | 2 ++ 3 files changed, 7 insertions(+) diff --git a/src/vs/workbench/contrib/notebook/browser/media/notebook.css b/src/vs/workbench/contrib/notebook/browser/media/notebook.css index 4c05e20b37453..171f0e5f8c656 100644 --- a/src/vs/workbench/contrib/notebook/browser/media/notebook.css +++ b/src/vs/workbench/contrib/notebook/browser/media/notebook.css @@ -26,6 +26,10 @@ z-index: 100; } +.monaco-workbench .notebookOverlay .cell-list-container { + overflow: hidden; +} + .monaco-workbench .notebookOverlay .cell-list-container .overflowingContentWidgets > div { z-index: 600 !important; /* @rebornix: larger than the editor title bar */ diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts index 5350c33cfb5e2..82d7940a11471 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts @@ -1678,6 +1678,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor this._localStore.clear(); this._list?.dispose(); + this._listTopCellToolbar?.dispose(); this._overlayContainer.remove(); this.viewModel?.dispose(); diff --git a/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts b/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts index 71fcf82ed16b4..7f43e90969fa1 100644 --- a/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts +++ b/src/vs/workbench/contrib/notebook/test/testNotebookEditor.ts @@ -33,6 +33,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService'; +import { ScrollEvent } from 'vs/base/common/scrollable'; export class TestCell extends NotebookCellTextModel { constructor( @@ -69,6 +70,7 @@ export class TestNotebookEditor implements INotebookEditor { multipleKernelsAvailable: boolean = false; onDidChangeAvailableKernels: Event = new Emitter().event; onDidChangeActiveCell: Event = new Emitter().event; + onDidScroll = new Emitter().event; uri?: URI | undefined; textModel?: NotebookTextModel | undefined;