-
Notifications
You must be signed in to change notification settings - Fork 204
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
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
27476d0
Add @vscode-elements/elements package
tuan-nguen 25bb51c
Replace all VSCodeButton with VscodeButton
tuan-nguen 5336388
Make view tests run
tuan-nguen 73c38ae
Fix tests
tuan-nguen 5966cea
Replace VSCodeTextField for VscodeTextfield
tuan-nguen 3924561
Replace VSCodeDropdown and VSCodeOption
tuan-nguen 24a3530
Fix MethodRow stories
tuan-nguen 8e7a93b
Replace VSCodeBadge
tuan-nguen 1db6add
Fix AlertTable stories
tuan-nguen f466998
Replace VSCodeDivider and fix LibraryRow stories
tuan-nguen 82427ed
Replace VSCodeCheckbox
tuan-nguen cfd4b63
Replace VSCodeProgressRing
tuan-nguen 33d7a58
Add new Badge component to apply border-radius by default
tuan-nguen 4a29bab
Use custom Badge component
tuan-nguen 3b1e929
Replace VSCodePanelTab
tuan-nguen 2dd5dd9
Merge branch 'main' of https://github.com/github/vscode-codeql into t…
tuan-nguen f655fab
Remove vscode/webview-ui-toolkit
tuan-nguen 4eaee21
Fix RepoRow tests
tuan-nguen 560c379
Fix VariantAnalysisActions tests
tuan-nguen 3941de8
Mock out assignedElements from HTMLSlotElement
tuan-nguen 986399a
Replace Button secondary attribute
tuan-nguen 56bc3b4
Tidy up props for VariantAnalysisOutcomePanels
tuan-nguen e9f85b0
Add ActionButton component
tuan-nguen d59a84b
Add --vscode-contrastActiveBorder to the rest of the stories themes
tuan-nguen bebde7c
Tweak ActionButton styles and add comments
tuan-nguen 5bf2ca5
Fix styles for icon buttons
tuan-nguen b801c78
Fix lint
tuan-nguen 4eeea10
Use correct css variables for Link
tuan-nguen 6e225d3
Bring back icon for SearchBox
tuan-nguen 8cd4b20
Change Dropdown prop from onInput to onChange
tuan-nguen cb9a79c
Add negative right margin to Checkbox
tuan-nguen 71e69f6
Fix divider styling
tuan-nguen 6f39d9b
Remove eslint-disables
tuan-nguen f467281
Merge branch 'main' of https://github.com/github/vscode-codeql into t…
tuan-nguen 8014162
Use css modules instead of global classes
tuan-nguen c639f7d
Remove manually added css variable
tuan-nguen 5a799b2
Add default value for action button hover outline
tuan-nguen 329ac0d
Default action button outline to transparent
tuan-nguen 718cdc9
Fix check-types job
tuan-nguen 1d2a22a
Fix Badge for method modelling
tuan-nguen 881ef75
Don't render 0 if a result is falsy
tuan-nguen fca2ee7
Add changelog
tuan-nguen edf0f46
Revert change to CHANGELOG
tuan-nguen c263e30
Tidy up ActionButton css module
tuan-nguen 4c49158
Make comment clearer
tuan-nguen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module "*.module.css"; |
61 changes: 61 additions & 0 deletions
61
extensions/ql-vscode/src/view/common/ActionButton/ActionButton.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* Styles have been copied from https://vscode-elements.github.io/elements-lite/components/action-button/configurator/ */ | ||
.actionButton { | ||
align-items: center; | ||
background-color: transparent; | ||
border-color: transparent; | ||
border-style: solid; | ||
border-width: 1px; | ||
border-radius: 5px; | ||
color: var(--vscode-foreground); | ||
display: inline-flex; | ||
cursor: pointer; | ||
padding: 0; | ||
user-select: none; | ||
} | ||
|
||
.actionButton:disabled { | ||
color: var(--vscode-disabledForeground); | ||
cursor: default; | ||
pointer-events: none; | ||
} | ||
|
||
.actionButton .codicon, | ||
tuan-nguen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.actionButton svg { | ||
color: var(--vscode-icon-foreground); | ||
display: block; | ||
padding: 2px; | ||
} | ||
|
||
.actionButton svg { | ||
box-sizing: content-box; | ||
height: 16px; | ||
width: 16px; | ||
} | ||
|
||
.actionButton:disabled .codicon, | ||
.actionButton:disabled svg { | ||
color: var(--vscode-disabledForeground); | ||
} | ||
|
||
.actionButton:hover { | ||
background-color: var(--vscode-toolbar-hoverBackground); | ||
outline: 1px dotted var(--vscode-contrastActiveBorder, transparent); | ||
outline-offset: -1px; | ||
} | ||
|
||
.actionButton:active { | ||
background-color: var(--vscode-toolbar-activeBackground); | ||
} | ||
|
||
.actionButton:focus { | ||
outline: none; | ||
} | ||
|
||
.actionButton:focus-visible { | ||
border-color: var(--vscode-focusBorder); | ||
} | ||
|
||
.label { | ||
tuan-nguen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
display: block; | ||
padding: 0 5px 0 2px; | ||
} |
9 changes: 9 additions & 0 deletions
9
extensions/ql-vscode/src/view/common/ActionButton/ActionButton.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import styles from "./ActionButton.module.css"; | ||
|
||
// This is needed because vscode-elements/elements does not implement | ||
// the same styles for icon buttons as vscode/webview-ui-toolkit | ||
export const ActionButton = (props: React.ComponentProps<"button">) => ( | ||
<button type="button" {...props} className={styles.actionButton}> | ||
{props.children} | ||
</button> | ||
); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.