Browse Source

Add graph setting for auto-dimming merge commit rows (#2401)

main
Ramin Tadayon 2 years ago
committed by GitHub
parent
commit
e398897a7e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 0 deletions
  1. +7
    -0
      package.json
  2. +1
    -0
      src/config.ts
  3. +2
    -0
      src/plus/webviews/graph/graphWebview.ts
  4. +1
    -0
      src/plus/webviews/graph/protocol.ts
  5. +1
    -0
      src/webviews/apps/plus/graph/GraphWrapper.tsx
  6. +14
    -0
      src/webviews/apps/settings/partials/commit-graph.html

+ 7
- 0
package.json View File

@ -2236,6 +2236,13 @@
"scope": "window",
"order": 24
},
"gitlens.graph.dimMergeCommits": {
"type": "boolean",
"default": false,
"markdownDescription": "Specifies whether to always dim rows with merge commits in the _Commit Graph_",
"scope": "window",
"order": 25
},
"gitlens.graph.commitOrdering": {
"type": "string",
"default": "date",

+ 1
- 0
src/config.ts View File

@ -387,6 +387,7 @@ export interface GraphConfig {
dateFormat: DateTimeFormat | string | null;
dateStyle: DateStyle | null;
defaultItemLimit: number;
dimMergeCommits: boolean;
highlightRowsOnRefHover: boolean;
scrollRowPadding: number;
showDetailsView: 'open' | 'selection' | false;

+ 2
- 0
src/plus/webviews/graph/graphWebview.ts View File

@ -529,6 +529,7 @@ export class GraphWebview extends WebviewBase {
configuration.changed(e, 'graph.avatars') ||
configuration.changed(e, 'graph.dateFormat') ||
configuration.changed(e, 'graph.dateStyle') ||
configuration.changed(e, 'graph.dimMergeCommits') ||
configuration.changed(e, 'graph.highlightRowsOnRefHover') ||
configuration.changed(e, 'graph.scrollRowPadding') ||
configuration.changed(e, 'graph.showGhostRefsOnRowHover') ||
@ -1453,6 +1454,7 @@ export class GraphWebview extends WebviewBase {
dateFormat:
configuration.get('graph.dateFormat') ?? configuration.get('defaultDateFormat') ?? 'short+short',
dateStyle: configuration.get('graph.dateStyle') ?? configuration.get('defaultDateStyle'),
dimMergeCommits: configuration.get('graph.dimMergeCommits'),
enableMultiSelection: false,
highlightRowsOnRefHover: configuration.get('graph.highlightRowsOnRefHover'),
scrollRowPadding: configuration.get('graph.scrollRowPadding'),

+ 1
- 0
src/plus/webviews/graph/protocol.ts View File

@ -107,6 +107,7 @@ export interface GraphComponentConfig {
avatars?: boolean;
dateFormat: DateTimeFormat | string;
dateStyle: DateStyle;
dimMergeCommits?: boolean;
enableMultiSelection?: boolean;
highlightRowsOnRefHover?: boolean;
scrollRowPadding?: number;

+ 1
- 0
src/webviews/apps/plus/graph/GraphWrapper.tsx View File

@ -941,6 +941,7 @@ export function GraphWrapper({
columnsSettings={columns}
contexts={context}
cssVariables={styleProps?.cssVariables}
dimMergeCommits={graphConfig?.dimMergeCommits}
enableMultiSelection={graphConfig?.enableMultiSelection}
excludeRefsById={excludeRefsById}
excludeByType={excludeTypes}

+ 14
- 0
src/webviews/apps/settings/partials/commit-graph.html View File

@ -135,6 +135,20 @@
<div class="setting">
<div class="setting__input">
<input
id="graph.dimMergeCommits"
name="graph.dimMergeCommits"
type="checkbox"
data-setting
/>
<label for="graph.dimMergeCommits"
>Always dim merge commit rows</label
>
</div>
</div>
<div class="setting">
<div class="setting__input">
<input
id="graph.showRemoteNames"
name="graph.showRemoteNames"
type="checkbox"

Loading…
Cancel
Save