Skip to content
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

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

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

tuan-nguen
Copy link
Contributor

@tuan-nguen tuan-nguen commented Apr 3, 2025

This removes the use of @vscode/webview-ui-toolkit and replaces it with @vscode-elements/react-elements. The PR could not broken down to smaller PRs because importing both libraries breaks the view tests. Both libraries register similarly named components (e.g. vscode-button) which have conflicting implementations and that causes an error when tests are run.

I have created a new component ActionButton which aims to copy the styles that @vscode/webview-ui-toolkit for VSCodeButton when appearance="icon". I did this because the new library renders the background even when it's an icon button.

I have also added a new component Badge which applies variant="counter" by default which applies a border-radius to the badge.

I have also replaced getBy* queries with findBy* in view tests because getBy* doesn't seem to load elements with all their attributes; however, findBy* selects elements only when all the attributes have been loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant