소스 검색

Updates local branch filter in the graph

main
Keith Daulton 2 년 전
committed by Keith Daulton
부모
커밋
bb1b1d6c6a
1개의 변경된 파일13개의 추가작업 그리고 9개의 파일을 삭제
  1. +13
    -9
      src/webviews/apps/plus/graph/GraphWrapper.tsx

+ 13
- 9
src/webviews/apps/plus/graph/GraphWrapper.tsx 파일 보기

@ -505,10 +505,16 @@ export function GraphWrapper({
}
};
// This can only be applied to one radio button for now due to a bug in the component: https://github.com/microsoft/fast/issues/6381
const handleLocalBranchFiltering = (e: Event | FormEvent<HTMLElement>) => {
const $el = e.target as HTMLInputElement;
const value = $el.value;
const isChecked = $el.checked;
onIncludeOnlyRef?.(!isChecked);
const wantsAllBranches = value === 'branch-all' && isChecked;
if (isAllBranches === wantsAllBranches) {
return;
}
onIncludeOnlyRef?.(wantsAllBranches);
};
const handleMissingAvatars = (emails: GraphAvatars) => {
@ -853,20 +859,18 @@ export function GraphWrapper({
<MenuList slot="content">
<MenuLabel>Filter options</MenuLabel>
<MenuItem role="none">
<VSCodeRadioGroup orientation="vertical">
<VSCodeRadioGroup
orientation="vertical"
value={isAllBranches ? 'branch-all' : 'branch-current'}
>
<VSCodeRadio
name="branching-toggle"
value="branch-all"
checked={isAllBranches}
onChange={handleLocalBranchFiltering}
>
Show All Local Branches
</VSCodeRadio>
<VSCodeRadio
name="branching-toggle"
value="branch-current"
checked={!isAllBranches}
onChange={handleLocalBranchFiltering}
>
<VSCodeRadio name="branching-toggle" value="branch-current">
Show Current Branch Only
</VSCodeRadio>
</VSCodeRadioGroup>

불러오는 중...
취소
저장