Skip to content

Commit d7eca2e

Browse files
Improves labeling and icon
1 parent 0549b9f commit d7eca2e

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1111
- Adds new ability to search for a GitLab MR in the _Launchpad_ — closes [#3788](https://github.com/gitkraken/vscode-gitlens/issues/3788)
1212
- Adds go to home view button to the commit graph title section — closes [#3873](https://github.com/gitkraken/vscode-gitlens/issues/3873)
1313
- Adds a _Contributors_ section to comparison results in the views
14-
- Adds a new control for graph branches visibility — closes [#3101](https://github.com/gitkraken/vscode-gitlens/issues/3101)
14+
- Adds a new Hidden Branches dropdown next to the Branch Visibility dropdown in the graph toolbar — closes [#3101](https://github.com/gitkraken/vscode-gitlens/issues/3101)
1515

1616
### Changed
1717

src/webviews/apps/plus/graph/GraphWrapper.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ export function GraphWrapper({
890890
const fixedExcludeRefsById = useMemo(() => ({ ...excludeRefsById }), [excludeRefsById]);
891891
const handleOnToggleRefsVisibilityClick = (_event: any, refs: GraphRefOptData[], visible: boolean) => {
892892
if (!visible) {
893-
document.getElementById('test')?.animate(
893+
document.getElementById('hiddenRefs')?.animate(
894894
[
895895
{ offset: 0, background: 'transparent' },
896896
{
@@ -1060,8 +1060,6 @@ export function GraphWrapper({
10601060
onChangeSelection?.(rows);
10611061
};
10621062

1063-
const hasExcludedRefs = excludeRefsById && Object.keys(excludeRefsById).length;
1064-
10651063
return (
10661064
<>
10671065
<header className="titlebar graph-app__header">
@@ -1389,20 +1387,21 @@ export function GraphWrapper({
13891387
distance={0}
13901388
>
13911389
<GlTooltip placement="top" slot="anchor">
1392-
<button type="button" id="test" className="action-button">
1393-
<CodeIcon icon={`eye`} />
1390+
<button type="button" id="hiddenRefs" className="action-button">
1391+
<CodeIcon icon={`eye-closed`} />
13941392
{Object.values(excludeRefsById ?? {}).length}
13951393
<CodeIcon
13961394
className="action-button__more"
13971395
icon="chevron-down"
13981396
aria-hidden="true"
13991397
/>
14001398
</button>
1401-
<span slot="content">Hidden branches</span>
1399+
<span slot="content">Hidden Branches / Tags</span>
14021400
</GlTooltip>
14031401
<div slot="content">
1404-
<MenuLabel>Hidden branches</MenuLabel>
1405-
{hasExcludedRefs &&
1402+
<MenuLabel>Hidden Branches / Tags</MenuLabel>
1403+
{excludeRefsById &&
1404+
Object.keys(excludeRefsById).length &&
14061405
[...Object.values(excludeRefsById), null].map(ref =>
14071406
ref ? (
14081407
<MenuItem
@@ -1426,7 +1425,7 @@ export function GraphWrapper({
14261425
);
14271426
}}
14281427
>
1429-
Show all
1428+
Show All
14301429
</MenuItem>
14311430
),
14321431
)}

0 commit comments

Comments
 (0)