vscode-elements / elements

Web component library for developing Visual Studio Code extensions
https://vscode-elements.github.io
MIT License
156 stars 28 forks source link

File select #47

Closed worksofliam closed 1 year ago

worksofliam commented 1 year ago

Hi!

We are using the old input box like so:

<vscode-inputbox type="file" id="thefile" name="fileselect"></vscode-inputbox>

which allows users to select a file.

I see in the docs that we should be switching to Textfield, but it doesn't look like it supports type=file.

Any suggestions on what we could do for this?

worksofliam commented 1 year ago

I also see that inputbox is marked as deprecated, but the examples are still using it. D:

bendera commented 1 year ago

Hi,

I fix it ASAP, sorry for that.

bendera commented 1 year ago

A new version is bumped.

When I made the new textfield I thought using a file input in a webview is not a real scenario because the extension API has a dedicated function to pick a file from the file system. I was wrong obviously. Now the file picker is ugly but works at least. I will improve its appearance.

The reason I marked the inputbox deprecated is that it is overcomplicated. It is a textfiled and a textarea at the same time. Originally I wanted to emulate the behavior of the source control inputbox with the warning and error messages and the dynamic resizing. But it is unnecessary, everybody just wants a simple textfield or a textarea. And yes, I should update the examples.

worksofliam commented 1 year ago

@bendera thank you, I appreciate your fast response. I and many others love your project!