Skip to content

Commit 10db4dd

Browse files
authored
data explorer: remove convert-to-code feature flag (#9110)
Removes feature flag from implemented convert to code backends. ### Release Notes <!-- Optionally, replace `N/A` with text to be included in the next release notes. The `N/A` bullets are ignored. If you refer to one or more Positron issues, these issues are used to collect information about the feature or bugfix, such as the relevant language pack as determined by Github labels of type `lang: `. The note will automatically be tagged with the language. These notes are typically filled by the Positron team. If you are an external contributor, you may ignore this section. --> #### New Features - N/A #### Bug Fixes - N/A ### QA Notes - Convert to code button SHOULD show up for pandas dataframes - Convert to code button SHOULD NOT show up for polars dataframes, any R dataframes, csvs, parquets, etc
1 parent 32620c5 commit 10db4dd

2 files changed

Lines changed: 1 addition & 65 deletions

File tree

src/vs/workbench/contrib/positronDataExplorerEditor/browser/positronDataExplorerEditor.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import { IPositronDataExplorerService, PositronDataExplorerLayout } from '../../
2828
import { PositronDataExplorerEditorInput } from './positronDataExplorerEditorInput.js';
2929
import { PositronDataExplorerClosed, PositronDataExplorerClosedStatus } from '../../../browser/positronDataExplorer/components/dataExplorerClosed/positronDataExplorerClosed.js';
3030
import { POSITRON_DATA_EXPLORER_CODE_SYNTAXES_AVAILABLE, POSITRON_DATA_EXPLORER_IS_COLUMN_SORTING, POSITRON_DATA_EXPLORER_IS_CONVERT_TO_CODE_ENABLED, POSITRON_DATA_EXPLORER_IS_PLAINTEXT, POSITRON_DATA_EXPLORER_IS_ROW_FILTERING, POSITRON_DATA_EXPLORER_LAYOUT } from './positronDataExplorerContextKeys.js';
31-
import { checkDataExplorerConvertToCodeEnabled, DATA_EXPLORER_CONVERT_TO_CODE } from '../../../services/positronDataExplorer/common/positronDataExplorerConvertToCodeConfig.js';
32-
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
3331
import { SupportStatus } from '../../../services/languageRuntime/common/positronDataExplorerComm.js';
3432

3533
/**
@@ -220,7 +218,6 @@ export class PositronDataExplorerEditor extends EditorPane implements IPositronD
220218
*/
221219
constructor(
222220
readonly _group: IEditorGroup,
223-
@IConfigurationService private readonly _configurationService: IConfigurationService,
224221
@IPositronDataExplorerService private readonly _positronDataExplorerService: IPositronDataExplorerService,
225222
@IStorageService storageService: IStorageService,
226223
@ITelemetryService telemetryService: ITelemetryService,
@@ -257,15 +254,6 @@ export class PositronDataExplorerEditor extends EditorPane implements IPositronD
257254
this._isRowFilteringContextKey = POSITRON_DATA_EXPLORER_IS_ROW_FILTERING.bindTo(
258255
this._group.scopedContextKeyService
259256
);
260-
261-
// Listen for configuration changes to the convert to code setting and update the context key accordingly.
262-
this._register(this._configurationService.onDidChangeConfiguration(event => {
263-
if (event.affectsConfiguration(DATA_EXPLORER_CONVERT_TO_CODE)) {
264-
this._isConvertToCodeEnabledContextKey.set(
265-
checkDataExplorerConvertToCodeEnabled(this._configurationService)
266-
);
267-
}
268-
}));
269257
}
270258

271259
/**
@@ -360,7 +348,7 @@ export class PositronDataExplorerEditor extends EditorPane implements IPositronD
360348
const convertToCode = backendState.supported_features.convert_to_code;
361349

362350
this._isConvertToCodeEnabledContextKey.set((
363-
convertToCode.support_status === SupportStatus.Supported) && checkDataExplorerConvertToCodeEnabled(this._configurationService)
351+
convertToCode.support_status === SupportStatus.Supported)
364352
);
365353
this._codeSyntaxesAvailableContextKey.set(
366354
!!(convertToCode.code_syntaxes && convertToCode.code_syntaxes.length > 0)

src/vs/workbench/services/positronDataExplorer/common/positronDataExplorerConvertToCodeConfig.ts

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)