Skip to content

Commit 4f14592

Browse files
committed
Extract vscode-codeql__vertical-rule class to component
1 parent acca6b3 commit 4f14592

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { styled } from "styled-components";
2+
3+
export const VerticalRule = styled.span`
4+
border-left: 1px solid var(--vscode-dropdown-border);
5+
height: 100%;
6+
position: absolute;
7+
top: 0;
8+
bottom: 0;
9+
`;

extensions/ql-vscode/src/view/results/AlertTablePathNodeRow.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as Keys from "./result-keys";
44
import { SarifLocation } from "./locations/SarifLocation";
55
import { selectableZebraStripe } from "./result-table-utils";
66
import { useCallback, useMemo } from "react";
7+
import { VerticalRule } from "../common/VerticalRule";
78

89
interface Props {
910
step: Sarif.ThreadFlowLocation;
@@ -54,10 +55,10 @@ export function AlertTablePathNodeRow(props: Props) {
5455
className={isSelected ? "vscode-codeql__selected-path-node" : undefined}
5556
>
5657
<td className="vscode-codeql__icon-cell">
57-
<span className="vscode-codeql__vertical-rule"></span>
58+
<VerticalRule />
5859
</td>
5960
<td className="vscode-codeql__icon-cell">
60-
<span className="vscode-codeql__vertical-rule"></span>
61+
<VerticalRule />
6162
</td>
6263
<td
6364
{...selectableZebraStripe(

extensions/ql-vscode/src/view/results/AlertTablePathRow.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { selectableZebraStripe } from "./result-table-utils";
55
import { AlertTablePathNodeRow } from "./AlertTablePathNodeRow";
66
import { AlertTableDropdownIndicatorCell } from "./AlertTableDropdownIndicatorCell";
77
import { useCallback, useMemo } from "react";
8+
import { VerticalRule } from "../common/VerticalRule";
89

910
interface Props {
1011
path: Sarif.ThreadFlow;
@@ -53,7 +54,7 @@ export function AlertTablePathRow(props: Props) {
5354
{...selectableZebraStripe(isPathSpecificallySelected, resultIndex)}
5455
>
5556
<td className="vscode-codeql__icon-cell">
56-
<span className="vscode-codeql__vertical-rule"></span>
57+
<VerticalRule />
5758
</td>
5859
<AlertTableDropdownIndicatorCell
5960
expanded={currentPathExpanded}

extensions/ql-vscode/src/view/results/resultsView.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,6 @@ td.vscode-codeql__path-index-cell {
145145
text-align: right !important;
146146
}
147147

148-
.vscode-codeql__vertical-rule {
149-
border-left: 1px solid var(--vscode-dropdown-border);
150-
height: 100%;
151-
position: absolute;
152-
top: 0;
153-
bottom: 0;
154-
}
155-
156148
.octicon {
157149
fill: var(--vscode-editor-foreground);
158150
margin-top: 0.25em;

0 commit comments

Comments
 (0)