You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Views: Support contributable welcome view content #89080
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:
I prefer the contributes.documentation.VIEWID. That has the benefits of being more clear what it targets, looks more like the menu syntax and makes it easier for extensions to write when clauses.
I am personally not a big fan of the documentation name, however since we already use it in other places I think it makes sense to use it here also.
label is usually just a ux label, this feels to me as bit more. So I would prefer content or markdown.
Also note that debug would render something before this contributed section and something after this contributed section if possible. So the view should have the start, middle and end. With the middle being contributable.
If we prefer the documentation contribution point, I prefer the contributes.documentation.view approach as it lets us control the top level of the documentation namespace.
One goal is that another extension can contribute getting-started text, e.g. a GH extension can contribute to the SCM view, etc. Not sure how that would look with this integrated approach
Also it does not make a lot of sense for debug. Since all our extensions are not contributing views, and all of them want to contribute to our start view.
It turns out using markdown for this isn't feasible, since the library we currently use doesn't allow to prevent certain features (headers, tables, etc), not even using the renderer API. Since all we want are actually links, another option is to extract the work Benjamin Pasero (@bpasero) did for notifications into something reusable.
Could you configure it to only allow a very specific set of tags (try the allowedTags attribute)? Not sure if this would still be confusing for extension authors
We would only want to support links in this feature. No headers, no images, no styling, no lists, no tables. So, we'd need a markdown feature set filter.
Feedback from Jonathan Carter
"Hey! Yep I tried it out, and it worked great. I'm looking forward to being able to use this for most of our team's extensions: Live Share, VS Online, etc."
Johannes Rieken (@jrieken) so we got some positive feedback on API from extensions. Let me know if there is something else we need to do before we finalise it.
I have removed the proposed API check. Since this was already tested last milestone via #91269 I will simply reopen that test plan move it to this milestone and only let 1 person be assigned to it.
Activity
isidorn commentedon Jan 22, 2020
Looks good to me.
I prefer the
contributes.documentation.VIEWID. That has the benefits of being more clear what it targets, looks more like the menu syntax and makes it easier for extensions to writewhenclauses.I am personally not a big fan of the
documentationname, however since we already use it in other places I think it makes sense to use it here also.labelis usually just a uxlabel, this feels to me as bit more. So I would prefercontentormarkdown.Also note that debug would render something before this contributed section and something after this contributed section if possible. So the view should have the start, middle and end. With the middle being contributable.
fyi Andre Weinand (@weinand)
jrieken commentedon Jan 22, 2020
I guess we also need an event for when that's changing...
jrieken commentedon Jan 22, 2020
Also adding Matt Bierner (@mjbvz) for the
doccontribution pointmjbvz commentedon Jan 22, 2020
Could we put this on
viewscontribution itself? Something like:{ "contributes": { "views": { "explorer": [ { "id": "nodeDependencies", "name": "Node Dependencies", "when": "workspaceHasPackageJSON", "emptyContent": [{ "markdown": "My empty message", "when": "CONDITION" }] } ] } } }If we prefer the
documentationcontribution point, I prefer thecontributes.documentation.viewapproach as it lets us control the top level of thedocumentationnamespace.jrieken commentedon Jan 23, 2020
One goal is that another extension can contribute getting-started text, e.g. a GH extension can contribute to the SCM view, etc. Not sure how that would look with this integrated approach
isidorn commentedon Jan 23, 2020
Also it does not make a lot of sense for debug. Since all our extensions are not contributing views, and all of them want to contribute to our start view.
joaomoreno commentedon Jan 24, 2020
It turns out using markdown for this isn't feasible, since the library we currently use doesn't allow to prevent certain features (headers, tables, etc), not even using the renderer API. Since all we want are actually links, another option is to extract the work Benjamin Pasero (@bpasero) did for notifications into something reusable.
mjbvz commentedon Jan 24, 2020
João Moreno (@joaomoreno) We use
insaneto sanitize rendered markdownvscode/src/vs/base/browser/markdownRenderer.ts
Line 189 in 82ed3d4
Could you configure it to only allow a very specific set of tags (try the
allowedTagsattribute)? Not sure if this would still be confusing for extension authorsjoaomoreno commentedon Jan 27, 2020
We would only want to support links in this feature. No headers, no images, no styling, no lists, no tables. So, we'd need a markdown feature set filter.
17 remaining items
isidorn commentedon Mar 6, 2020
Assigning to me, ropening and adding api-finalisation since we would like to finalise this API this milestone.
alexr00 commentedon Mar 6, 2020
Assigning to me too since this impacts custom views as well.
isidorn commentedon Mar 24, 2020
Feedback from Jonathan Carter
"Hey! Yep I tried it out, and it worked great. I'm looking forward to being able to use this for most of our team's extensions: Live Share, VS Online, etc."
Johannes Rieken (@jrieken) so we got some positive feedback on API from extensions. Let me know if there is something else we need to do before we finalise it.
jrieken commentedon Mar 24, 2020
go for it. add a test plan item and these things
isidorn commentedon Mar 24, 2020
I have removed the proposed API check. Since this was already tested last milestone via #91269 I will simply reopen that test plan move it to this milestone and only let 1 person be assigned to it.