Skip to content

Add the ability to programatically show a webview sidebar panel, as is possible with treeview panels #175129

@DanTup

Description

@DanTup

Sorry if this is already possible, but I cannot find a way.

If I add a treeview to the side bar, I can easily show it from my extension code if the user runs a command that requires showing the tree:

const tree = vs.window.createTreeView(/*...*/);
/// ...
tree.reveal(node);

However, there doesn't seem to be any way to do the equivalent for a webview in the sidebar. I can register a WebviewViewProvider but I have no ability to call show() on anything until after resolveWebviewView is called, but that's not called until the panel in the sidebar has already been shown.

I can't find any API that would let me show a webview sidebar panel by its ID, nor any documented command for it.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insiderson-testplantree-viewsExtension tree view issueswebview-viewsWebview views in the sidebar and panel

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions