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

Collapsible panel section component #260

Closed
estruyf opened this issue Oct 12, 2021 · 11 comments
Closed

Collapsible panel section component #260

estruyf opened this issue Oct 12, 2021 · 11 comments
Labels
component request Requests for components to be added to the Webview Toolkit

Comments

@estruyf
Copy link

estruyf commented Oct 12, 2021

Feature/component description

Creation of an accordion / collapsible section component. Similar to the panel sections which you have on the explorer panel.

Use case

To create an experience that comes close to the OOTB VS Code experience in your webviews, it would be great to have a collapsible section component.

Screenshots/references

Screenshot 2021-10-12 at 10 38 41

@estruyf estruyf added the enhancement New feature or request label Oct 12, 2021
@hawkticehurst
Copy link
Member

Thanks for the request!

To help a bit more with my understanding could you provide some examples or ideas of what you would use the accordion for?

For example, is your hope that the accordion would contain a tree view (like in the photo above) or some other content? If you have an extension idea or extension that you actively work on where would the accordion fit into that extension?

@daviddossett daviddossett added component request Requests for components to be added to the Webview Toolkit and removed enhancement New feature or request labels Oct 12, 2021
@estruyf
Copy link
Author

estruyf commented Oct 13, 2021

@hawkticehurst I use the accordion to mimic the same behavior in my Front Matter panel (https://frontmatter.codes/) as all other panels from VS Code.

image

I just want to be able to render any kind of HTML elements in it, not only a tree view.

@idoprz
Copy link

idoprz commented Oct 13, 2021

Another example of collapse/expand. I have "tasks.json" graphical editor:
image

@hawkticehurst
Copy link
Member

hawkticehurst commented Oct 27, 2021

I just want to be able to render any kind of HTML elements in it, not only a tree view.

Sorry, one more clarification since I may be misunderstanding, but does the image you sent not already have arbitrary HTML inside the collapsable sidebar Webview Views?

accordian-vscode

@hawkticehurst
Copy link
Member

Another example of collapse/expand. I have "tasks.json" graphical editor

Thanks! That's helpful.

@daviddossett
Copy link
Collaborator

daviddossett commented Oct 27, 2021

I had a similar question re: rendering HTML in a panel. @estruyf are you currently using this Webview View API?

Webview views that are rendered in the sidebar or panel areas. See the webview view sample extension for more details

Based on the screenshots, I assume you already are. If that's the case, is it simply a matter of wanting that same component in an editor panel instead of the sidebar?

@estruyf
Copy link
Author

estruyf commented Oct 28, 2021

Correct @daviddossett, I'm using it in a webview. Having the web component available would allow us to reuse it in custom sidebars and align the style.

@hawkticehurst
Copy link
Member

Thanks for the clarification @estruyf! The last question I have is if you could give a bit more information/screenshots about the task.json example.

It seems pretty straightforward and makes me wonder if it would be possible to implement a sort of hybrid extension that uses both the TreeView API and Webview API in a similar fashion to the notepad sample extension?

That way you get the built-in styling of a collapsible UI element (not to mention the speed of a native API), along with the flexibility of rendering whatever content you need inside a webview.

But again I could certainly be misinterpreting the screenshot you sent so any further info would be appreciated!

@idoprz
Copy link

idoprz commented Oct 29, 2021

The tasks.json was actually my example. 🙄
We do have tasks in a TreeView. But if you want to see the task dependent tasks, it should be in a tree inside the webview.

@hawkticehurst
Copy link
Member

hawkticehurst commented Oct 29, 2021

Ahh shoot my apologies! Totally skimmed over the username without looking closely 🤦🏻‍♂️.

But also got it, thanks for clarifying!

@hawkticehurst
Copy link
Member

Hi all,

Back with a final update: I'm very sorry to say that the toolkit is being deprecated and all active development will be coming to a close.

There was an announcement last week where you can learn more details and leave any questions or comments you may have.

Beyond that, thank you so much filing this issue and apologies for never getting around to addressing it. It means a lot that you contributed to the improvement of this project. I wish you all the best in your future VS Code extension endeavors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component request Requests for components to be added to the Webview Toolkit
Projects
None yet
Development

No branches or pull requests

4 participants