Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14629,7 +14629,7 @@
"vscode:prepublish": "yarn run bundle"
},
"dependencies": {
"@gitkraken/gitkraken-components": "10.1.8",
"@gitkraken/gitkraken-components": "10.1.9",
"@microsoft/fast-element": "1.12.0",
"@microsoft/fast-react-wrapper": "0.3.18",
"@octokit/core": "4.2.4",
Expand Down
11 changes: 2 additions & 9 deletions src/webviews/apps/plus/graph/GraphWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const createIconElements = (): Record<string, ReactElement> => {
'message',
'changes',
'files',
'settings',
];

const miniIconList = ['upstream-ahead', 'upstream-behind'];
Expand Down Expand Up @@ -1397,6 +1398,7 @@ export function GraphWrapper({
onGraphColumnsReOrdered={handleOnGraphColumnsReOrdered}
onGraphMouseLeave={minimap.current ? handleOnGraphMouseLeave : undefined}
onGraphRowHovered={minimap.current ? handleOnGraphRowHovered : undefined}
onSettingsClick={handleToggleColumnSettings}
onSelectGraphRows={handleSelectGraphRows}
onToggleRefsVisibilityClick={handleOnToggleRefsVisibilityClick}
onEmailsMissingAvatarUrls={handleMissingAvatars}
Expand All @@ -1416,15 +1418,6 @@ export function GraphWrapper({
) : (
<p>No repository is selected</p>
)}
<button
className="column-button"
type="button"
role="button"
data-vscode-context={context?.settings || JSON.stringify({ webviewItem: 'gitlens:graph:settings' })}
onClick={handleToggleColumnSettings}
>
<span className="codicon codicon-settings-gear" aria-label="Column Settings"></span>
</button>
Comment on lines -1419 to -1427
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was removed, but how can GitLens provide the data-vscode-context now? @ericf-axosoft @axosoft-ramint

Copy link
Contributor Author

@ericf-axosoft ericf-axosoft Jul 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The graph sets the data-vscode-context for the button by using the actual contexts.settings input property provided by Gitlens.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we pass context to the graph as a prop contexts and context.settings makes it to the button via the prop as contexts.settings

</main>
</>
);
Expand Down
14 changes: 12 additions & 2 deletions src/webviews/apps/plus/graph/graph.scss
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ button:not([disabled]),
}
}

.column-button {
.columns-settings {
--column-button-height: 19px;

position: absolute;
Expand Down Expand Up @@ -452,6 +452,10 @@ button:not([disabled]),
}
}

.gk-graph.bs-tooltip {
z-index: 1040;
}

.alert {
--alert-foreground: var(--color-alert-foreground);
--alert-background: var(--color-alert-infoBackground);
Expand Down Expand Up @@ -717,7 +721,13 @@ button:not([disabled]),
content: '\ea9a';
}
}

&--settings {
&::before {
// codicon-settings-gear
font-family: codicon;
content: '\eb51';
}
}
&--branch {
&::before {
// codicon-git-branch
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.44.0.tgz#961a5903c74139390478bdc808bcde3fc45ab7af"
integrity sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==

"@gitkraken/gitkraken-components@10.1.8":
version "10.1.8"
resolved "https://registry.yarnpkg.com/@gitkraken/gitkraken-components/-/gitkraken-components-10.1.8.tgz#2ee9e70817d51b0928731e57e640ac49f3e7502c"
integrity sha512-kq6d+HVlELdFHpIMMgVuopqjX63Jtt7udW7OHbhf1Za/rrlwczX2K1a+wPYEGVQvHjaOrghTVmG/mogNhMQ0qA==
"@gitkraken/gitkraken-components@10.1.9":
version "10.1.9"
resolved "https://registry.npmjs.org/@gitkraken/gitkraken-components/-/gitkraken-components-10.1.9.tgz#751a9bce02f46a11facc000fefe7844802a8c9c8"
integrity sha512-1NicZneMfzj4zuqtZjlAMho/85+qseqM+cEHLR696qcEV0sp0AmujPTvj4PZCIV/Y7J/j3uKvAMFzBsbgdTi4g==
dependencies:
"@axosoft/react-virtualized" "9.22.3-gitkraken.3"
classnames "2.3.2"
Expand Down