File tree Expand file tree Collapse file tree 5 files changed +18
-25
lines changed
Expand file tree Collapse file tree 5 files changed +18
-25
lines changed Original file line number Diff line number Diff line change 11import type { Meta , StoryFn } from "@storybook/react" ;
2- import { VSCodeButton , VSCodeLink } from "@vscode/webview-ui-toolkit/react" ;
2+ import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" ;
33
44import { VariantAnalysisContainer } from "../../view/variant-analysis/VariantAnalysisContainer" ;
55import { Alert } from "../../view/common" ;
6+ import { Link } from "../../view/common/Link" ;
67
78export default {
89 title : "Alert" ,
@@ -24,7 +25,7 @@ Warning.args = {
2425 title : "This query found a warning" ,
2526 message : (
2627 < >
27- Warning content with < VSCodeLink > links</ VSCodeLink >
28+ Warning content with < Link > links</ Link >
2829 </ >
2930 ) ,
3031} ;
@@ -50,7 +51,7 @@ Error.args = {
5051 title : "This query found an error" ,
5152 message : (
5253 < >
53- Error content with < VSCodeLink > links</ VSCodeLink >
54+ Error content with < Link > links</ Link >
5455 </ >
5556 ) ,
5657} ;
@@ -70,8 +71,7 @@ ErrorExample.args = {
7071 < >
7172 Request to
7273 https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries
73- failed. < VSCodeLink > View actions logs</ VSCodeLink > and try running this
74- query again.
74+ failed. < Link > View actions logs</ Link > and try running this query again.
7575 </ >
7676 ) ,
7777} ;
Original file line number Diff line number Diff line change 11import { styled } from "styled-components" ;
2- import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" ;
32
43import type {
54 AnalysisMessage ,
@@ -12,6 +11,7 @@ import { createRemoteFileRef } from "../../../common/location-link-utils";
1211import { CodeSnippetMessage } from "./CodeSnippetMessage" ;
1312import { CodeSnippetLine } from "./CodeSnippetLine" ;
1413import { sendTelemetry } from "../telemetry" ;
14+ import { Link } from "../Link" ;
1515
1616const borderColor = "var(--vscode-editor-snippetFinalTabstopHighlightBorder)" ;
1717
@@ -72,12 +72,9 @@ export const FileCodeSnippet = ({
7272 return (
7373 < Container >
7474 < TitleContainer >
75- < VSCodeLink
76- onClick = { sendCodeSnippetTitleLinkTelemetry }
77- href = { titleFileUri }
78- >
75+ < Link onClick = { sendCodeSnippetTitleLinkTelemetry } href = { titleFileUri } >
7976 { fileLink . filePath }
80- </ VSCodeLink >
77+ </ Link >
8178 </ TitleContainer >
8279 { message && severity && (
8380 < CodeSnippetMessage message = { message } severity = { severity } >
@@ -93,12 +90,9 @@ export const FileCodeSnippet = ({
9390 return (
9491 < Container >
9592 < TitleContainer >
96- < VSCodeLink
97- onClick = { sendCodeSnippetTitleLinkTelemetry }
98- href = { titleFileUri }
99- >
93+ < Link onClick = { sendCodeSnippetTitleLinkTelemetry } href = { titleFileUri } >
10094 { fileLink . filePath }
101- </ VSCodeLink >
95+ </ Link >
10296 </ TitleContainer >
10397 < CodeContainer >
10498 { code . map ( ( line , index ) => (
Original file line number Diff line number Diff line change 11import type { ReactNode } from "react" ;
2- import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" ;
32import { Alert } from "../common" ;
43import { vscode } from "../vscode-api" ;
54import { VariantAnalysisFailureReason } from "../../variant-analysis/shared/variant-analysis" ;
5+ import { Link } from "../common/Link" ;
66
77type Props = {
88 failureReason : VariantAnalysisFailureReason ;
@@ -33,8 +33,8 @@ const getMessage = (failureReason: VariantAnalysisFailureReason): ReactNode => {
3333 return (
3434 < >
3535 The GitHub Actions workflow run has failed.{ " " }
36- < VSCodeLink onClick = { openLogs } > View actions logs</ VSCodeLink > and try
37- running this query again.
36+ < Link onClick = { openLogs } > View actions logs</ Link > and try running this
37+ query again.
3838 </ >
3939 ) ;
4040 case VariantAnalysisFailureReason . InternalError :
Original file line number Diff line number Diff line change 1- import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" ;
2-
31import type { CellValue } from "../../common/raw-result-types" ;
42import { sendTelemetry } from "../common/telemetry" ;
53import { convertNonPrintableChars } from "../../common/text-utils" ;
64import { tryGetRemoteLocation } from "../../common/bqrs-utils" ;
75import { RawNumberValue } from "../common/RawNumberValue" ;
6+ import { Link } from "../common/Link" ;
87
98type CellProps = {
109 value : CellValue ;
@@ -35,9 +34,9 @@ export const RawResultCell = ({
3534 const safeLabel = convertNonPrintableChars ( value . value . label ) ;
3635 if ( url ) {
3736 return (
38- < VSCodeLink onClick = { sendRawResultsLinkTelemetry } href = { url } >
37+ < Link onClick = { sendRawResultsLinkTelemetry } href = { url } >
3938 { safeLabel }
40- </ VSCodeLink >
39+ </ Link >
4140 ) ;
4241 } else {
4342 return < span > { safeLabel } </ span > ;
Original file line number Diff line number Diff line change 11import { styled } from "styled-components" ;
2- import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" ;
32import { formatDate } from "../../common/date" ;
43import { VariantAnalysisStatus } from "../../variant-analysis/shared/variant-analysis" ;
4+ import { Link } from "../common/Link" ;
55
66export type VariantAnalysisStatusStatsProps = {
77 variantAnalysisStatus : VariantAnalysisStatus ;
@@ -37,7 +37,7 @@ export const VariantAnalysisStatusStats = ({
3737 < span > { completedAt !== undefined ? formatDate ( completedAt ) : "-" } </ span >
3838 ) }
3939 { onViewLogsClick && (
40- < VSCodeLink onClick = { onViewLogsClick } > View actions logs</ VSCodeLink >
40+ < Link onClick = { onViewLogsClick } > View actions logs</ Link >
4141 ) }
4242 </ Container >
4343 ) ;
You can’t perform that action at this time.
0 commit comments