vscode-docs
vscode-docs copied to clipboard
Add recommendations for location of custom view containers
While building my first extension and reading this section, I am wondering which is the right location to place my custom view container: Should I add it to the activity bar or to the panel on the bottom? Does this merely depend on the layout of the view container's views' contents or is there some general advice? It might be helpful to add a few dos and don'ts for this question to the section linked above.
Hi @LinqLover View containers can only be added to the Activity bar. Views can be added to other view containers, in either the Activity bar or panel. I don't believe a view container from an extension can be placed in the panel by default.
Thanks, this explains it from a technical perspective. Nevertheless I think the docs should clarify this to avoid confusion. :-)
@LinqLover I recently updated the extension UX guidelines and there's actually a bit on View locations here: https://code.visualstudio.com/api/ux-guidelines/panel
[Don't] Use for Views that are meant to be always visible since users often minimize the Panel
You can actually add a View Container to the panel now. It looks something like this:
I'd recommend starting with the activity bar given it's discoverability unless you have a specific reason to use the Panel.
Thank you very much!