Skip to content
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

Fixing setting layout in OE #23536

Merged
merged 1 commit into from
Jun 29, 2023
Merged
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 @@ -46,6 +46,7 @@ configurationRegistry.registerConfiguration({
'id': 'startupConfig',
'title': localize('startupConfig', "Startup Configuration"),
'type': 'object',
'order': 0,
'properties': {
'startup.alwaysShowServersView': {
'type': 'boolean',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@ const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Con
export const SERVER_GROUP_AUTOEXPAND_CONFIG = 'autoExpand';

const serverGroupConfig: IConfigurationNode = {
id: 'Server Groups',
id: 'serverGroup',
type: 'object',
title: localize('objectExplorerConfigurationTitle', "Object Explorer"),
order: 2,
properties: {
[SERVER_GROUP_CONFIG + '.' + SERVER_GROUP_COLORS_CONFIG]: <IJSONSchema>{
[`${SERVER_GROUP_CONFIG}.${SERVER_GROUP_AUTOEXPAND_CONFIG}`]: {
'order': 2,
'type': 'boolean',
'description': localize('serverGroup.autoExpand', "Auto-expand Server Groups in the Object Explorer viewlet."),
'default': 'true'
},
[`${SERVER_GROUP_CONFIG}.${SERVER_GROUP_COLORS_CONFIG}`]: <IJSONSchema>{
type: 'array',
items: 'string',
order: 3,
'description': localize('serverGroup.colors', "Server Group color palette used in the Object Explorer viewlet."),
default: [
'#A1634D',
Expand All @@ -33,11 +42,6 @@ const serverGroupConfig: IConfigurationNode = {
DefaultServerGroupColor
]
},
[SERVER_GROUP_CONFIG + '.' + SERVER_GROUP_AUTOEXPAND_CONFIG]: {
'type': 'boolean',
'description': localize('serverGroup.autoExpand', "Auto-expand Server Groups in the Object Explorer viewlet."),
'default': 'true'
},
}
};

Expand All @@ -46,14 +50,15 @@ const serverTreeConfig: IConfigurationNode = {
'id': 'serverTree',
'title': localize('serverTree.configuration.title', "Server Tree"),
'type': 'object',
'order': 1,
'properties': {
'serverTree.useAsyncServerTree': {
[`serverTree.useAsyncServerTree`]: {
'type': 'boolean',
'default': true,
'description': localize('serverTree.useAsyncServerTree', "Use the new async server tree for the Servers view and Connection Dialog with support for new features such as dynamic node filtering. Requires a restart to take effect.")
}
}
};

configurationRegistry.registerConfiguration(serverGroupConfig);
configurationRegistry.registerConfiguration(serverTreeConfig);
configurationRegistry.registerConfiguration(serverGroupConfig);
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import { localize } from 'vs/nls';
import { tocData as vstocData, ITOCEntry } from 'vs/workbench/contrib/preferences/browser/settingsLayout';

export const OBJECT_EXPLORER_CONFIG_PREFIX = 'objectExplorer';

// Copy existing table of contents and append
export const tocData: ITOCEntry<string> = Object.assign({}, vstocData);
let sqlTocItems: ITOCEntry<string>[] = [{
Expand All @@ -15,7 +17,12 @@ let sqlTocItems: ITOCEntry<string>[] = [{
{
id: 'data/connection',
label: localize('connection', "Connection"),
settings: ['startup.alwaysShowServersView', 'connection.*', 'serverGroup.*', 'datasource.*']
settings: ['connection.*', 'datasource.*']
},
{
id: 'data/objectExplorer',
label: localize('objectExplorer', "Object Explorer"),
settings: ['startup.alwaysShowServersView', 'serverTree.*', 'serverGroup.*']
},
{
id: 'data/queryEditor',
Expand Down
Loading