Skip to content

Commit

Permalink
SCM - switch to an experimental setting (#216713)
Browse files Browse the repository at this point in the history
  • Loading branch information
lszomoru authored Jun 20, 2024
1 parent 05bd928 commit b03fd7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/vs/workbench/contrib/scm/browser/scm.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
});
Expand Down
8 changes: 4 additions & 4 deletions src/vs/workbench/contrib/scm/browser/scmViewPane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
});
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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')
};
}

Expand Down

0 comments on commit b03fd7c

Please sign in to comment.