Skip to content

Allow WebviewViews to be explicitly created, so badges can be shown #146330

@matthewjamesadam

Description

@matthewjamesadam

VSCode extensions can now show badges for TreeViews and WebviewViews that they implement: #144775

One problem with this implementation is that I believe there is no way for an extension to display a badge for a WebviewView until the user has clicked and opened that WebviewView in the sidebar. I think this is an important use case: imagine a TODO extension, like https://github.com/Gruntfuggly/todo-tree (they are one extension that wants to use this API). If I used such an extension, I would expect that the badge would show up on the activation bar showing that I have TODOs as soon as I open up the workspace, even if I haven't yet opened up that extension's Webview View.

TreeViews can show badges on startup, because an extension can call createTreeView to programatically force TreeView creation, and can then set the badge on the TreeView. Would it make sense to add a similar method to force creation of a WebviewView?

CC'ing @mjbvz for this issue. Thanks!

Metadata

Metadata

Assignees

Labels

apifeature-requestRequest for new features or functionalitywebview-viewsWebview views in the sidebar and panel

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions