Skip to content

Remove the use of @vscode/webview-ui-toolkit #3986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
27476d0
Add @vscode-elements/elements package
tuan-nguen Apr 1, 2025
25bb51c
Replace all VSCodeButton with VscodeButton
tuan-nguen Apr 1, 2025
5336388
Make view tests run
tuan-nguen Apr 1, 2025
73c38ae
Fix tests
tuan-nguen Apr 2, 2025
5966cea
Replace VSCodeTextField for VscodeTextfield
tuan-nguen Apr 2, 2025
3924561
Replace VSCodeDropdown and VSCodeOption
tuan-nguen Apr 2, 2025
24a3530
Fix MethodRow stories
tuan-nguen Apr 2, 2025
8e7a93b
Replace VSCodeBadge
tuan-nguen Apr 2, 2025
1db6add
Fix AlertTable stories
tuan-nguen Apr 2, 2025
f466998
Replace VSCodeDivider and fix LibraryRow stories
tuan-nguen Apr 2, 2025
82427ed
Replace VSCodeCheckbox
tuan-nguen Apr 2, 2025
cfd4b63
Replace VSCodeProgressRing
tuan-nguen Apr 2, 2025
33d7a58
Add new Badge component to apply border-radius by default
tuan-nguen Apr 3, 2025
4a29bab
Use custom Badge component
tuan-nguen Apr 3, 2025
3b1e929
Replace VSCodePanelTab
tuan-nguen Apr 3, 2025
2dd5dd9
Merge branch 'main' of https://github.com/github/vscode-codeql into t…
tuan-nguen Apr 3, 2025
f655fab
Remove vscode/webview-ui-toolkit
tuan-nguen Apr 3, 2025
4eaee21
Fix RepoRow tests
tuan-nguen Apr 3, 2025
560c379
Fix VariantAnalysisActions tests
tuan-nguen Apr 3, 2025
3941de8
Mock out assignedElements from HTMLSlotElement
tuan-nguen Apr 7, 2025
986399a
Replace Button secondary attribute
tuan-nguen Apr 7, 2025
56bc3b4
Tidy up props for VariantAnalysisOutcomePanels
tuan-nguen Apr 7, 2025
e9f85b0
Add ActionButton component
tuan-nguen Apr 7, 2025
d59a84b
Add --vscode-contrastActiveBorder to the rest of the stories themes
tuan-nguen Apr 7, 2025
bebde7c
Tweak ActionButton styles and add comments
tuan-nguen Apr 7, 2025
5bf2ca5
Fix styles for icon buttons
tuan-nguen Apr 7, 2025
b801c78
Fix lint
tuan-nguen Apr 7, 2025
4eeea10
Use correct css variables for Link
tuan-nguen Apr 9, 2025
6e225d3
Bring back icon for SearchBox
tuan-nguen Apr 9, 2025
8cd4b20
Change Dropdown prop from onInput to onChange
tuan-nguen Apr 9, 2025
cb9a79c
Add negative right margin to Checkbox
tuan-nguen Apr 9, 2025
71e69f6
Fix divider styling
tuan-nguen Apr 9, 2025
6f39d9b
Remove eslint-disables
tuan-nguen Apr 9, 2025
f467281
Merge branch 'main' of https://github.com/github/vscode-codeql into t…
tuan-nguen Apr 11, 2025
8014162
Use css modules instead of global classes
tuan-nguen Apr 11, 2025
c639f7d
Remove manually added css variable
tuan-nguen Apr 11, 2025
5a799b2
Add default value for action button hover outline
tuan-nguen Apr 14, 2025
329ac0d
Default action button outline to transparent
tuan-nguen Apr 14, 2025
718cdc9
Fix check-types job
tuan-nguen Apr 14, 2025
1d2a22a
Fix Badge for method modelling
tuan-nguen Apr 15, 2025
881ef75
Don't render 0 if a result is falsy
tuan-nguen Apr 16, 2025
fca2ee7
Add changelog
tuan-nguen Apr 16, 2025
edf0f46
Revert change to CHANGELOG
tuan-nguen Apr 16, 2025
c263e30
Tidy up ActionButton css module
tuan-nguen Apr 16, 2025
4c49158
Make comment clearer
tuan-nguen Apr 16, 2025
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
150 changes: 84 additions & 66 deletions extensions/ql-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1972,10 +1972,10 @@
"@octokit/plugin-retry": "^7.2.0",
"@octokit/plugin-throttling": "^9.6.0",
"@octokit/rest": "^21.1.1",
"@vscode-elements/react-elements": "^0.9.0",
"@vscode/codicons": "^0.0.36",
"@vscode/debugadapter": "^1.59.0",
"@vscode/debugprotocol": "^1.68.0",
"@vscode/webview-ui-toolkit": "^1.0.1",
"ajv": "^8.11.0",
"chokidar": "^3.6.0",
"d3": "^7.9.0",
Expand Down
2 changes: 0 additions & 2 deletions extensions/ql-vscode/src/stories/Overview.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Canvas, Meta, Story } from '@storybook/blocks';

import { VSCodeButton } from '@vscode/webview-ui-toolkit/react';

import iframeImage from './images/update-css-variables-iframe.png';
import stylesImage from './images/update-css-variables-styles.png';
import bodyImage from './images/update-css-variables-body.png';
Expand Down
6 changes: 3 additions & 3 deletions extensions/ql-vscode/src/stories/common/Alert.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryFn } from "@storybook/react";
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react";
import { VscodeButton } from "@vscode-elements/react-elements";

import { VariantAnalysisContainer } from "../../view/variant-analysis/VariantAnalysisContainer";
import { Alert } from "../../view/common";
Expand Down Expand Up @@ -84,8 +84,8 @@ ErrorWithButtons.args = {
"Request to https://api.github.com/repos/octodemo/Hello-World/code-scanning/codeql/queries failed. Try running this query again.",
actions: (
<>
<VSCodeButton appearance="secondary">View actions logs</VSCodeButton>
<VSCodeButton>Retry</VSCodeButton>
<VscodeButton secondary>View actions logs</VscodeButton>
<VscodeButton>Retry</VscodeButton>
</>
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ LibraryRow.args = {
],
},
modifiedSignatures: new Set(["org.sql2o.Sql2o#Sql2o(String)"]),
selectedSignatures: new Set(["org.sql2o.Sql2o#Sql2o(String)"]),
viewState: createMockModelEditorViewState({
showGenerateButton: true,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Source.args = {
modeledMethods: [{ ...modeledMethod, type: "source" }],
methodCanBeModeled: true,
viewState,
onChange: () => {},
};

export const Sink = Template.bind({});
Expand All @@ -120,6 +121,7 @@ Sink.args = {
modeledMethods: [{ ...modeledMethod, type: "sink" }],
methodCanBeModeled: true,
viewState,
onChange: () => {},
};

export const Summary = Template.bind({});
Expand All @@ -136,6 +138,7 @@ Neutral.args = {
modeledMethods: [{ ...modeledMethod, type: "neutral" }],
methodCanBeModeled: true,
viewState,
onChange: () => {},
};

export const AlreadyModeled = Template.bind({});
Expand All @@ -155,6 +158,7 @@ MultipleModelings.args = {
],
methodCanBeModeled: true,
viewState,
onChange: () => {},
};

export const ValidationError = Template.bind({});
Expand All @@ -166,6 +170,7 @@ ValidationError.args = {
],
methodCanBeModeled: true,
viewState,
onChange: () => {},
};

export const MultipleValidationErrors = Template.bind({});
Expand All @@ -180,4 +185,5 @@ MultipleValidationErrors.args = {
],
methodCanBeModeled: true,
viewState,
onChange: () => {},
};
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,7 @@ WithCodeFlows.args = {
showRawResults={() => action("show-raw-results")}
/>
),
userSettings: {
shouldShowProvenance: true,
},
};
1 change: 1 addition & 0 deletions extensions/ql-vscode/src/stories/vscode-theme-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
--vscode-descriptionForeground: rgba(204, 204, 204, 0.7);
--vscode-icon-foreground: #c5c5c5;
--vscode-focusBorder: #007fd4;
--vscode-contrastActiveBorder: #f38518;
--vscode-textSeparator-foreground: rgba(255, 255, 255, 0.18);
--vscode-textLink-foreground: #3794ff;
--vscode-textLink-activeForeground: #3794ff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
--vscode-descriptionForeground: #8b949e;
--vscode-icon-foreground: #8b949e;
--vscode-focusBorder: #1f6feb;
--vscode-contrastActiveBorder: #f38518;
--vscode-textSeparator-foreground: #21262d;
--vscode-textLink-foreground: #58a6ff;
--vscode-textLink-activeForeground: #58a6ff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
--vscode-descriptionForeground: #57606a;
--vscode-icon-foreground: #57606a;
--vscode-focusBorder: #0969da;
--vscode-contrastActiveBorder: #f38518;
--vscode-textSeparator-foreground: #d8dee4;
--vscode-textLink-foreground: #0969da;
--vscode-textLink-activeForeground: #0969da;
Expand Down
1 change: 1 addition & 0 deletions extensions/ql-vscode/src/stories/vscode-theme-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
--vscode-descriptionForeground: #717171;
--vscode-icon-foreground: #424242;
--vscode-focusBorder: #0090f1;
--vscode-contrastActiveBorder: #0f4a85;
--vscode-textSeparator-foreground: rgba(0, 0, 0, 0.18);
--vscode-textLink-foreground: #006ab1;
--vscode-textLink-activeForeground: #006ab1;
Expand Down
Loading
Loading