vscode-docs icon indicating copy to clipboard operation
vscode-docs copied to clipboard

Add recommendations for location of custom view containers

Open LinqLover opened this issue 3 years ago • 3 comments

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.

LinqLover avatar Sep 16 '21 10:09 LinqLover

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.

gregvanl avatar Oct 21 '21 19:10 gregvanl

Thanks, this explains it from a technical perspective. Nevertheless I think the docs should clarify this to avoid confusion. :-)

LinqLover avatar Oct 21 '21 22:10 LinqLover

@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:

panel-toolbar-multiple-views

I'd recommend starting with the activity bar given it's discoverability unless you have a specific reason to use the Panel.

daviddossett avatar Jun 09 '22 18:06 daviddossett

Thank you very much!

LinqLover avatar Aug 17 '22 14:08 LinqLover