Skip to content

Move data summary setting from "positron" to "dataExplorer" #7263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ export const tocData: ITOCEntry<string> = {
label: localize('fileExplorer', "Explorer"),
settings: ['explorer.*', 'outline.*']
},
// --- Start Positron ---
{
id: 'features/dataExplorer',
label: localize('dataExplorer', "Data Explorer"),
settings: ['dataExplorer.*']
},
// --- End Positron ---
{
id: 'features/search',
label: localize('search', "Search"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ import { positronConfigurationNodeBase } from '../../languageRuntime/common/lang
import { PositronDataExplorerLayout } from './interfaces/positronDataExplorerService.js';

// Key for the configuration setting
export const USE_POSITRON_DATA_EXPLORER_SUMMARY_COLLAPSED_KEY =
'positron.dataExplorerSummaryCollapsed';
export const USE_POSITRON_DATA_EXPLORER_SUMMARY_LAYOUT_KEY =
'positron.dataExplorerSummaryLayout';
export const USE_DATA_EXPLORER_SUMMARY_COLLAPSED_KEY =
'dataExplorer.summaryCollapsed';
export const USE_DATA_EXPLORER_SUMMARY_LAYOUT_KEY =
'dataExplorer.summaryLayout';

export function DataExplorerSummaryCollapseEnabled(
configurationService: IConfigurationService
) {
return Boolean(
configurationService.getValue(USE_POSITRON_DATA_EXPLORER_SUMMARY_COLLAPSED_KEY)
configurationService.getValue(USE_DATA_EXPLORER_SUMMARY_COLLAPSED_KEY)
);
}

export function DefaultDataExplorerSummaryLayout(
configurationService: IConfigurationService
) {
if (String(
configurationService.getValue(USE_POSITRON_DATA_EXPLORER_SUMMARY_LAYOUT_KEY)
configurationService.getValue(USE_DATA_EXPLORER_SUMMARY_LAYOUT_KEY)
) === 'left') {
return PositronDataExplorerLayout.SummaryOnLeft;
} else {
Expand All @@ -48,11 +48,11 @@ configurationRegistry.registerConfiguration({ // for summary collapse
...positronConfigurationNodeBase,
scope: ConfigurationScope.MACHINE_OVERRIDABLE,
properties: {
[USE_POSITRON_DATA_EXPLORER_SUMMARY_COLLAPSED_KEY]: {
[USE_DATA_EXPLORER_SUMMARY_COLLAPSED_KEY]: {
type: 'boolean',
default: false,
markdownDescription: localize(
'positron.enablePositronDataExplorerSummaryCollapse',
'positron.dataExplorerSummaryCollapsed',
'Collapse Data Explorer Summary Panel by default.'
),
},
Expand All @@ -62,7 +62,7 @@ configurationRegistry.registerConfiguration({ // for summary layout
...positronConfigurationNodeBase,
scope: ConfigurationScope.MACHINE_OVERRIDABLE,
properties: {
[USE_POSITRON_DATA_EXPLORER_SUMMARY_LAYOUT_KEY]: {
[USE_DATA_EXPLORER_SUMMARY_LAYOUT_KEY]: {
type: 'string',
default: 'left', // Default value (can be "left" or "right")
enum: ['left', 'right'], // Define possible values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { positronConfigurationNodeBase } from '../../languageRuntime/common/lang
import { SupportStatus } from '../../languageRuntime/common/positronDataExplorerComm.js';

// Key for the configuration setting
export const USE_POSITRON_DATA_EXPLORER_EXPERIMENTAL_KEY =
'positron.dataExplorerExperimental';
export const USE_DATA_EXPLORER_EXPERIMENTAL_KEY =
'dataExplorer.Experimental';

/**
* Retrieves the value of the configuration setting that determines whether to enable
Expand All @@ -28,7 +28,7 @@ export function checkDataExplorerExperimentalFeaturesEnabled(
configurationService: IConfigurationService
) {
return Boolean(
configurationService.getValue(USE_POSITRON_DATA_EXPLORER_EXPERIMENTAL_KEY)
configurationService.getValue(USE_DATA_EXPLORER_EXPERIMENTAL_KEY)
);
}

Expand All @@ -55,12 +55,12 @@ configurationRegistry.registerConfiguration({
...positronConfigurationNodeBase,
scope: ConfigurationScope.MACHINE_OVERRIDABLE,
properties: {
[USE_POSITRON_DATA_EXPLORER_EXPERIMENTAL_KEY]: {
[USE_DATA_EXPLORER_EXPERIMENTAL_KEY]: {
type: 'boolean',
default: false,
markdownDescription: localize(
'positron.enablePositronDataExplorerExperimentalFeatures',
'**CAUTION**: Enable experimental Positron Data Explorer features which may result in unexpected behaviour.'
'positron.enableDataExplorerExperimentalFeatures',
'**CAUTION**: Enable experimental Data Explorer features which may result in unexpected behavior.'
),
},
},
Expand Down
Loading