Browse Source

Updates graph filter icon indicator status

- Reserves indicator dot for all vs current filtering
 - No longer considers merge commit dimming as a "filter"
main
Eric Amodio 1 year ago
parent
commit
ded80bfc60
1 changed files with 7 additions and 13 deletions
  1. +7
    -13
      src/webviews/apps/plus/graph/GraphWrapper.tsx

+ 7
- 13
src/webviews/apps/plus/graph/GraphWrapper.tsx View File

@ -698,21 +698,15 @@ export function GraphWrapper({
}, [includeOnlyRefsById]);
const hasFilters = useMemo(() => {
if (!isAllBranches) {
return true;
}
if (graphConfig?.dimMergeCommits) {
return true;
}
if (excludeTypes == null) {
return false;
}
if (!isAllBranches) return true;
if (excludeTypes == null) return false;
return Object.values(excludeTypes).includes(true);
}, [excludeTypes, isAllBranches, graphConfig?.dimMergeCommits]);
const hasSpecialFilters = useMemo(() => {
return !isAllBranches;
}, [isAllBranches]);
const handleSearchInput = (e: CustomEvent<SearchQuery>) => {
const detail = e.detail;
setSearchQuery(detail);
@ -1139,7 +1133,7 @@ export function GraphWrapper({
<PopMenu>
<button type="button" className="action-button" slot="trigger" title="Filter Graph">
<span className={`codicon codicon-filter${hasFilters ? '-filled' : ''}`}></span>
{hasFilters && <span className="action-button__indicator"></span>}
{hasSpecialFilters && <span className="action-button__indicator"></span>}
<span
className="codicon codicon-chevron-down action-button__more"
aria-hidden="true"

||||||
x
 
000:0
Loading…
Cancel
Save