Skip to content

Views: Support contributable welcome view content #89080

@joaomoreno

Description

@joaomoreno

Problem

The need to have meaningful and actionable content rendered on empty views has been arising across the workbench:

Proposal

Let's enable the following in the core:

  1. Add an overridable isEmpty(): boolean method to ViewPane which would let view panes dictate when they are empty, as well as onDidChangeEmpty event
  2. Create a core contribution point for empty view content, supporting very simple Markdown (links only)
  3. Enhance the simple Markdown to be able to detect isolated command links and render them as buttons
  4. Render all empty view contributions in a ViewPane when isEmpty() === true

We can then update our API by exposing an extension contribution point for the same core contribution point created above. Here's a couple of proposals:

contributes.documentation.VIEWID

"contributes": {
  "documentation": {
    "VIEWID": [{
       "label": "MARKDOWN",
       "when": "CONDITION"
    }]
  }
}

Alternatives for documentation: viewhelp, emptyview.

Alternatives for label: text, markdown, description.

contributes.documentation.view

"contributes": {
  "documentation": {
    "view": [{
       "label": "MARKDOWN",
       "when": "VIEWID && CONDITION"
    }]
  }
}

cc @sbatten for views
cc @isidorn for debug
cc @sandy081, @alexr00 for custom views
cc @bowdenk7 for scm
cc @jrieken for input on API conventions

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions