Add preview features enabled flag to issue reporter info (#20808)

* Add preview features enabled flag to issue reporter info

* fix tests

* fix key
This commit is contained in:
Charles Gagnon
2022-10-11 15:46:32 -07:00
committed by GitHub
parent 22a2bce55e
commit 3005d5435f
13 changed files with 37 additions and 13 deletions

View File

@@ -46,6 +46,7 @@ import { ITextResourceConfigurationService } from 'vs/editor/common/services/tex
import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService';
import { ConnectionOptionSpecialType } from 'sql/platform/connection/common/interfaces';
import { ICodeEditorViewState } from 'vs/editor/common/editorCommon';
import { CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES } from 'sql/workbench/common/constants';
const QUERY_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'queryEditorViewState';
@@ -211,7 +212,7 @@ export class QueryEditor extends EditorPane {
this._exportAsNotebookAction = this.instantiationService.createInstance(actions.ExportAsNotebookAction, this);
this.setTaskbarContent();
this._register(this.configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration('workbench.enablePreviewFeatures')) {
if (e.affectsConfiguration(CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES)) {
this.setTaskbarContent();
}
}));
@@ -297,7 +298,7 @@ export class QueryEditor extends EditorPane {
}
private setTaskbarContent(): void {
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
const previewFeaturesEnabled = this.configurationService.getValue(CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES);
const fileExtension = path.extname(this.input?.uri || '');
const providerId = this.currentProvider;
const content: ITaskbarContent[] = [