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

Explore use of vscode-webview-ui-toolkit #3904

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

Conversation

Thomas1664
Copy link
Contributor

@Thomas1664 Thomas1664 commented Aug 30, 2022

I saw a few issues related to vscode-webview-ui-toolkit and I think using their components can make life easier for this extension:
#3035, #3785, #3900

However, I ran into a few issues when integrating components from the toolkit:

  • Icon buttons aren't properly formatted
    I think the best solution here would be to use codicons but the problem is that they don't provide a React component which makes them harder to use and to integrate.
  • Button groups require changing the CSS
    I whish the UI toolkit provided a way to handle this as button groups are a common use case.

@Thomas1664
Copy link
Contributor Author

Seems like submit buttons have a few issues: microsoft/vscode-webview-ui-toolkit#394 , microsoft/vscode-webview-ui-toolkit#395

@hawkticehurst
Copy link
Member

Hey @Thomas1664, maintainer of the toolkit here! 👋

I was catching up on old issues and saw this (and some other GHPRI extension issues related to the toolkit) linked and wanted to check in.

It's been on @daviddossett and I's to-do list for a long time to try and get this extension onboarded to the toolkit. We're hoping to ship a split button by the end of the year so as we're working towards that I'd love to hear more about any other blockers you have in adopting the toolkit and how we can help resolve those.

As a starter, it would be great to learn a bit more about the icon button and button group issues you were discussing above. Could you give some more context and details about this? (p.s. screenshots of examples are also always appreciated too)

Thanks in advance!

@Thomas1664
Copy link
Contributor Author

Thomas1664 commented Oct 13, 2022

Hi @hawkticehurst,

The reason why I want to have a ButtonGroup component is because there is no space between buttons. Bootstrap for example offers a similar feature via btn-group.

image

The icon button thing can be dropped because it isn't the fault of the toolkit that the icon isn't displayed in the center of the button but I wished there was an Icon component that allows the use of vscodeicons via React.

Icon Buttons:

Before:

image
image

After:

image
image

@daviddossett
Copy link
Contributor

Thanks for looking into this @Thomas1664. Once I've closed the larger overhaul PRs tied to #4029 I'll come back to this to see if I can resolve the issue with the icon button. I'm less worried about the button group for now but agree that it could be useful to have that in the future.

@hawkticehurst codicons should work just fine with the React versions of the toolkit, no?

@hbons hbons self-assigned this Jun 27, 2023
@@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ @

@hbons hbons added this to the Backlog milestone Dec 5, 2023
Mouhand999067

This comment was marked as off-topic.

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.

None yet

5 participants