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:
- Add an overridable
isEmpty(): boolean method to ViewPane which would let view panes dictate when they are empty, as well as onDidChangeEmpty event
- Create a core contribution point for empty view content, supporting very simple Markdown (links only)
- Enhance the simple Markdown to be able to detect isolated command links and render them as buttons
- 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
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:
isEmpty(): booleanmethod toViewPanewhich would let view panes dictate when they are empty, as well asonDidChangeEmptyeventViewPanewhenisEmpty() === trueWe 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
Alternatives for
documentation:viewhelp,emptyview.Alternatives for
label:text,markdown,description.contributes.documentation.view
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