From e4c5af266399991296e538d3428906e9dd918cbf Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Wed, 10 Feb 2021 16:24:12 -0800 Subject: [PATCH] Fix notebook views (#14249) --- .../notebookExplorer/notebookExplorerViewlet.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts index 88ad2a8972..3627ebd7cc 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts @@ -6,7 +6,7 @@ import { localize } from 'vs/nls'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IAction } from 'vs/base/common/actions'; -import { append, $, addClass, toggleClass, Dimension, IFocusTracker, getTotalHeight } from 'vs/base/browser/dom'; +import { $, toggleClass, Dimension, IFocusTracker, getTotalHeight, prepend } from 'vs/base/browser/dom'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions'; @@ -104,7 +104,6 @@ export class NotebookExplorerViewlet extends Viewlet { export class NotebookExplorerViewPaneContainer extends ViewPaneContainer { private root: HTMLElement; private static readonly MAX_TEXT_RESULTS = 10000; - private notebookSourcesBox: HTMLElement; private searchWidgetsContainerElement!: HTMLElement; searchWidget!: NotebookSearchWidget; private inputBoxFocused: IContextKey; @@ -135,15 +134,12 @@ export class NotebookExplorerViewPaneContainer extends ViewPaneContainer { } create(parent: HTMLElement): void { - addClass(parent, 'notebookExplorer-viewlet'); this.root = parent; + super.create(parent); + parent.classList.add('notebookExplorer-viewlet'); - this.searchWidgetsContainerElement = append(this.root, $('.header')); + this.searchWidgetsContainerElement = prepend(parent, $('.header')); this.createSearchWidget(this.searchWidgetsContainerElement); - - this.notebookSourcesBox = append(this.root, $('.notebookSources')); - - return super.create(this.notebookSourcesBox); } private createSearchWidget(container: HTMLElement): void {