put feature behind preview flag (#13147)

* put feature behind preview flag

* remove unused import
This commit is contained in:
Alan Ren
2020-10-30 10:17:54 -07:00
committed by GitHub
parent f5fc5c648e
commit 82d5fe3821
15 changed files with 30 additions and 37 deletions

View File

@@ -132,11 +132,6 @@ configurationRegistry.registerConfiguration({
'type': 'boolean',
'default': true,
'description': localize('connection.parseClipboardForConnectionStringDescription', "Attempt to parse the contents of the clipboard when the connection dialog is opened or a paste is performed.")
},
'connection.dialog.browse': {
'type': 'boolean',
'default': false,
'description': localize('connection.dialog.browse', "(Experimental) Show the browser tab in the connection dialog for discovering new connections")
}
}
});

View File

@@ -50,7 +50,7 @@ import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilit
export type TreeElement = ConnectionDialogTreeProviderElement | ITreeItemFromProvider | SavedConnectionNode | ServerTreeElement;
export class ConnectionBrowseTab implements IPanelTab {
public readonly title = localize('connectionDialog.browser', "Browse");
public readonly title = localize('connectionDialog.browser', "Browse (Preview)");
public readonly identifier = 'connectionBrowse';
public readonly view = this.instantiationService.createInstance(ConnectionBrowserView);
constructor(@IInstantiationService private readonly instantiationService: IInstantiationService) { }

View File

@@ -125,8 +125,8 @@ export class ConnectionDialogWidget extends Modal {
{ hasSpinner: true, spinnerTitle: localize('connecting', "Connecting"), hasErrors: true });
this._register(this._configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration('connection.dialog.browse') && this.browsePanel) {
const doUseBrowsePanel = this._configurationService.getValue<boolean>('connection.dialog.browse');
if (e.affectsConfiguration('workbench.enablePreviewFeatures') && this.browsePanel) {
const doUseBrowsePanel = this._configurationService.getValue<boolean>('workbench.enablePreviewFeatures');
if (doUseBrowsePanel && !this._panel.contains(this.browsePanel)) {
this._panel.pushTab(this.browsePanel);
} else if (!doUseBrowsePanel && this._panel.contains(this.browsePanel)) {
@@ -281,7 +281,7 @@ export class ConnectionDialogWidget extends Modal {
}
});
if (this._configurationService.getValue<boolean>('connection.dialog.browse')) {
if (this._configurationService.getValue<boolean>('workbench.enablePreviewFeatures')) {
this._panel.pushTab(this.browsePanel);
}