|
|
@ -67,6 +67,7 @@ export interface GraphWrapperProps { |
|
|
|
subscriber: (callback: UpdateStateCallback) => () => void; |
|
|
|
onSelectRepository?: (repository: GraphRepository) => void; |
|
|
|
onColumnsChange?: (colsSettings: GraphColumnsConfig) => void; |
|
|
|
onDimMergeCommits?: (dim: boolean) => void; |
|
|
|
onDoubleClickRef?: (ref: GraphRef) => void; |
|
|
|
onMissingAvatars?: (emails: { [email: string]: string }) => void; |
|
|
|
onMissingRefsMetadata?: (metadata: GraphMissingRefsMetadata) => void; |
|
|
@ -141,6 +142,7 @@ export function GraphWrapper({ |
|
|
|
state, |
|
|
|
onSelectRepository, |
|
|
|
onColumnsChange, |
|
|
|
onDimMergeCommits, |
|
|
|
onDoubleClickRef, |
|
|
|
onEnsureRowPromise, |
|
|
|
onMissingAvatars, |
|
|
@ -337,6 +339,10 @@ export function GraphWrapper({ |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
if (graphConfig?.dimMergeCommits) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
if (excludeTypes == null) { |
|
|
|
return false; |
|
|
|
} |
|
|
@ -491,11 +497,14 @@ export function GraphWrapper({ |
|
|
|
|
|
|
|
const value = $el.value; |
|
|
|
const isLocalBranches = ['branch-all', 'branch-current'].includes(value); |
|
|
|
if (!isLocalBranches && !['remotes', 'stashes', 'tags'].includes(value)) return; |
|
|
|
|
|
|
|
const key = value as keyof GraphExcludeTypes; |
|
|
|
if (!isLocalBranches && !['remotes', 'stashes', 'tags', 'mergeCommits'].includes(value)) return; |
|
|
|
const isChecked = $el.checked; |
|
|
|
if (value === 'mergeCommits') { |
|
|
|
onDimMergeCommits?.(isChecked); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const key = value as keyof GraphExcludeTypes; |
|
|
|
const currentFilter = excludeTypes?.[key]; |
|
|
|
if ((currentFilter == null && isChecked) || (currentFilter != null && currentFilter !== isChecked)) { |
|
|
|
setExcludeTypes({ |
|
|
@ -925,6 +934,15 @@ export function GraphWrapper({ |
|
|
|
Hide Tags |
|
|
|
</VSCodeCheckbox> |
|
|
|
</MenuItem> |
|
|
|
<MenuItem role="none"> |
|
|
|
<VSCodeCheckbox |
|
|
|
value="mergeCommits" |
|
|
|
onChange={handleExcludeTypeChange} |
|
|
|
defaultChecked={graphConfig?.dimMergeCommits ?? false} |
|
|
|
> |
|
|
|
Dim Merge Commit Rows |
|
|
|
</VSCodeCheckbox> |
|
|
|
</MenuItem> |
|
|
|
</MenuList> |
|
|
|
</PopMenu> |
|
|
|
<span> |
|
|
|