SCM - switch to an experimental setting (#216713)

This commit is contained in:
Ladislau Szomoru 2024-06-20 15:40:52 +02:00 committed by GitHub
parent 05bd928e61
commit b03fd7c498
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View file

@ -349,6 +349,11 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).regis
],
description: localize('scm.workingSets.default', "Controls the default working set to use when switching to a source control history item group that does not have a working set."),
default: 'current'
},
'scm.experimental.showHistoryGraph': {
type: 'boolean',
description: localize('scm.experimental.showHistoryGraph', "Controls whether to show the history graph instead of incoming/outgoing changes in the Source Control view."),
default: false
}
}
});

View file

@ -1203,7 +1203,7 @@ class SeparatorRenderer implements ICompressibleTreeRenderer<SCMViewSeparatorEle
append(element, $('.separator'));
disposables.add(label);
if (this.configurationService.getValue<boolean>('scm.showHistoryGraph') !== true) {
if (this.configurationService.getValue<boolean>('scm.experimental.showHistoryGraph') !== true) {
const toolBar = new MenuWorkbenchToolBar(append(element, $('.actions')), MenuId.SCMChangesSeparator, { moreIcon: Codicon.gear }, this.menuService, this.contextKeyService, this.contextMenuService, this.keybindingService, this.commandService, this.telemetryService);
disposables.add(toolBar);
}
@ -1609,7 +1609,7 @@ MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
MenuRegistry.appendMenuItem(MenuId.SCMTitle, {
title: localize('scmChanges', "Incoming & Outgoing"),
submenu: Menus.ChangesSettings,
when: ContextKeyExpr.and(ContextKeyExpr.equals('view', VIEW_PANE_ID), ContextKeys.RepositoryCount.notEqualsTo(0), ContextKeyExpr.equals('config.scm.showHistoryGraph', true).negate()),
when: ContextKeyExpr.and(ContextKeyExpr.equals('view', VIEW_PANE_ID), ContextKeys.RepositoryCount.notEqualsTo(0), ContextKeyExpr.equals('config.scm.experimental.showHistoryGraph', true).negate()),
group: '0_view&sort',
order: 2
});
@ -3017,7 +3017,7 @@ export class SCMViewPane extends ViewPane {
e.affectsConfiguration('scm.showChangesSummary') ||
e.affectsConfiguration('scm.showIncomingChanges') ||
e.affectsConfiguration('scm.showOutgoingChanges') ||
e.affectsConfiguration('scm.showHistoryGraph'),
e.affectsConfiguration('scm.experimental.showHistoryGraph'),
this.visibilityDisposables)
(() => this.updateChildren(), this, this.visibilityDisposables);
@ -4125,7 +4125,7 @@ class SCMTreeDataSource implements IAsyncDataSource<ISCMViewService, TreeElement
showChangesSummary: this.configurationService.getValue<boolean>('scm.showChangesSummary'),
showIncomingChanges: this.configurationService.getValue<ShowChangesSetting>('scm.showIncomingChanges'),
showOutgoingChanges: this.configurationService.getValue<ShowChangesSetting>('scm.showOutgoingChanges'),
showHistoryGraph: this.configurationService.getValue<boolean>('scm.showHistoryGraph')
showHistoryGraph: this.configurationService.getValue<boolean>('scm.experimental.showHistoryGraph')
};
}