Remove notebook.enabled feature flag (#3866)

* Remove notebook.enabled feature flag

* Fix build error with package.json typos
This commit is contained in:
Kevin Cunnane
2019-01-31 09:34:50 -08:00
committed by GitHub
parent 100938b0e5
commit d9c383b2ef
4 changed files with 5 additions and 26 deletions

View File

@@ -17,11 +17,6 @@
"type": "object",
"title": "%notebook.configuration.title%",
"properties": {
"notebook.enabled": {
"type": "boolean",
"default": true,
"description": "%notebook.enabled.description%"
},
"notebook.pythonPath": {
"type": "string",
"default": "",
@@ -55,20 +50,17 @@
"menus": {
"commandPalette": [
{
"command": "notebook.command.new",
"when": "config.notebook.enabled"
"command": "notebook.command.new"
},
{
"command": "notebook.command.open",
"when": "config.notebook.enabled"
"command": "notebook.command.open"
}
]
},
"keybindings": [
{
"command": "notebook.command.new",
"key": "Ctrl+Shift+N",
"when": "config.notebook.enabled"
"key": "Ctrl+Shift+N"
}
]
},

View File

@@ -2,7 +2,6 @@
"displayName": "Notebook Core Extensions",
"description": "Defines the Data-procotol based Notebook contribution and many Notebook commands and contributions.",
"notebook.configuration.title": "Notebook configuration",
"notebook.enabled.description": "Enable viewing notebook files using built-in notebook editor.",
"notebook.pythonPath.description": "Local path to python installation used by Notebooks.",
"notebook.sqlKernelEnabled.description": "Enable SQL kernel in notebook editor (Preview)",
"notebook.command.new": "New Notebook",

View File

@@ -13,7 +13,7 @@ import { QueryResultsInput } from 'sql/parts/query/common/queryResultsInput';
import { QueryInput } from 'sql/parts/query/common/queryInput';
import { IQueryEditorOptions } from 'sql/parts/query/common/queryEditorService';
import { QueryPlanInput } from 'sql/parts/queryPlan/queryPlanInput';
import { NotebookInput, NotebookInputModel, NotebookInputValidator } from 'sql/parts/notebook/notebookInput';
import { NotebookInput, NotebookInputModel } from 'sql/parts/notebook/notebookInput';
import { DEFAULT_NOTEBOOK_PROVIDER, INotebookService } from 'sql/workbench/services/notebook/common/notebookService';
import { getProvidersForFileName, getStandardKernelsForProvider } from 'sql/parts/notebook/notebookUtils';
import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput';
@@ -56,9 +56,8 @@ export function convertEditorInput(input: EditorInput, options: IQueryEditorOpti
}
//Notebook
let notebookValidator = instantiationService.createInstance(NotebookInputValidator);
uri = getNotebookEditorUri(input, instantiationService);
if (uri && notebookValidator.isNotebookEnabled()) {
if (uri) {
return withService<INotebookService, NotebookInput>(instantiationService, INotebookService, notebookService => {
let fileName: string = 'untitled';
let providerIds: string[] = [DEFAULT_NOTEBOOK_PROVIDER];

View File

@@ -11,7 +11,6 @@ import { IEditorModel } from 'vs/platform/editor/common/editor';
import { EditorInput, EditorModel, ConfirmResult } from 'vs/workbench/common/editor';
import { Emitter, Event } from 'vs/base/common/event';
import URI from 'vs/base/common/uri';
import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import * as resources from 'vs/base/common/resources';
import * as sqlops from 'sqlops';
@@ -22,8 +21,6 @@ import Severity from 'vs/base/common/severity';
export type ModeViewSaveHandler = (handle: number) => Thenable<boolean>;
export let notebooksEnabledCondition = ContextKeyExpr.equals('config.notebook.enabled', true);
export class NotebookInputModel extends EditorModel {
private dirty: boolean;
@@ -105,14 +102,6 @@ export class NotebookInputModel extends EditorModel {
}
}
export class NotebookInputValidator {
constructor( @IContextKeyService private readonly _contextKeyService: IContextKeyService) { }
public isNotebookEnabled(): boolean {
return this._contextKeyService.contextMatchesRules(notebooksEnabledCondition);
}
}
export class NotebookInput extends EditorInput {