Notebook views UI 2 (#15865)

Provide access to the Notebook Views UI. Feature is hidden behind a feature flag.

Co-authored-by: rkselfhost <rkselfhost@outlook.com>
This commit is contained in:
Daniel Grajeda
2021-08-17 15:15:28 -06:00
committed by GitHub
parent 82576e54a4
commit 640c6f30f4
29 changed files with 989 additions and 140 deletions

View File

@@ -98,7 +98,6 @@ suite('NotebookViewModel', function (): void {
assert.equal(cellsWithNewView.length, 2);
assert.equal(viewModel.cells.length, 2);
assert.equal(viewModel.hiddenCells.length, 0);
assert.equal(viewModel.name, defaultViewName);
});
@@ -111,7 +110,6 @@ suite('NotebookViewModel', function (): void {
assert.equal(cellsWithNewView.length, 2);
assert.equal(viewModel.cells.length, 2);
assert.equal(viewModel.hiddenCells.length, 0);
assert.equal(viewModel.name, defaultViewName);
});

View File

@@ -20,7 +20,7 @@ import { IContextViewProvider, IDelegate } from 'vs/base/browser/ui/contextview/
import { IEditorPane } from 'vs/workbench/common/editor';
import { INotebookShowOptions } from 'sql/workbench/api/common/sqlExtHost.protocol';
import { NotebookViewsExtension } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension';
import { INotebookView, INotebookViewCell, INotebookViews } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViews';
import { INotebookView, INotebookViewCell, INotebookViewMetadata, INotebookViews } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViews';
export class NotebookModelStub implements INotebookModel {
constructor(private _languageInfo?: nb.ILanguageInfo, private _cells?: ICellModel[], private _testContents?: nb.INotebookContents) {
@@ -809,6 +809,8 @@ export class NotebookViewStub implements INotebookView {
}
export class NotebookViewsStub implements INotebookViews {
onActiveViewChanged: vsEvent.Event<void>;
metadata: INotebookViewMetadata;
notebook: INotebookModel;
onViewDeleted: vsEvent.Event<void>;
createNewView(name?: string): INotebookView {