Skip to content

Commit 827c847

Browse files
committed
Color and align linked issue icons
Wraps the issue state icon in a .section-icon span and adds two new state classes (.issue-open, .issue-closed) coloured with the existing --vscode-issues-open and --vscode-issues-closed tokens that this extension contributes. Matches the colouring convention already used for reviewer state icons (.section-icon.approved). The .section-icon container also provides flex centering and 3px padding, which fixes the icon-vs-link spacing in the row.
1 parent eab2b35 commit 827c847

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

webviews/common/common.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,14 @@ body img.avatar {
286286
fill: var(--vscode-issues-open);
287287
}
288288

289+
.section-icon.issue-open svg path {
290+
fill: var(--vscode-issues-open);
291+
}
292+
293+
.section-icon.issue-closed svg path {
294+
fill: var(--vscode-issues-closed);
295+
}
296+
289297
.reviewer-icons {
290298
display: flex;
291299
gap: 4px;

webviews/components/sidebar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,12 @@ function ConvertToDraft() {
595595
}
596596

597597
function IssueItem({ issue }: { issue: IssueReference }) {
598+
const isOpen = issue.state === GithubItemStateEnum.Open;
598599
return (
599600
<div className="avatar-with-author">
600-
{issue.state === GithubItemStateEnum.Open ? issueIcon : issueClosedIcon}
601+
<span className={`section-icon ${isOpen ? 'issue-open' : 'issue-closed'}`}>
602+
{isOpen ? issueIcon : issueClosedIcon}
603+
</span>
601604
<a href={issue.url} title={issue.url}>#{issue.number} {issue.title}</a>
602605
</div>
603606
);

0 commit comments

Comments
 (0)