Vscode: Use markdown preview like regular webview for extensions

Created on 15 Nov 2019  路  8Comments  路  Source: microsoft/vscode

We're currently just using a markdown preview for our "welcome" document, but this has some drawbacks that could be addressed by adding some features to the markdown preview:

  • A way to set the title on the tab to something custom rather than "Preview welcome.md"
  • A way to set the security policy on the view so that command: URIs can work (for jumping to the settings panel, etc.)
  • This might just be addressed by adding a command to grab the webview handle for the webview underlying the markdown preview. Then extension users could open a markdown preview then just manipulate it like a webview.

Again I know I can just use a webview for this but I don't really need the full capabilities of a webview and it would be kind of nice if the markdown preview could be used like a webview. (Maybe there's a way to obtain a reference to the webview used by the markdown preview but if so I don't know what it is.)

*out-of-scope markdown

Most helpful comment

The problem with this issue is that you jumped right to the solution: extending the markdown preview. But that is not a good solution. Using the markdown preview for welcome pages would not create a good experience for users and it would not help extensions easily create good welcome UX. Also the markdown preview exists to preview markdown files; it is not going to become be a generic markdown rendering extension point that extensions can hook into so they can render fancy welcome pages

Instead, share what the end goal for a welcome UX is. Is it education? Telling users about new issues? Soliciting donation? Once we understand the problems and goals, we can work backwards to find a good solution that addresses them.

All 8 comments

I did check and it doesn't seem to be a duplicate.

Extending the markdown preview in this way out of scope. It would add a lot of complication and not give you what you are really after, namely a unified welcome UX that extensions can hook into.

Please continue following up on https://github.com/microsoft/vscode/issues/83451 or open a new issue if you have a proposal on what a welcome UX could involve

Well this actually is such a proposal. If this is out of scope then it would require a duplicate Implementation of the markdown preview functionality In order to have simple welcome functionality based on markdown. Perhaps such duplication already exists though since extensions have their own markdown-based README view.

@mjbvz

a proposal on what a welcome UX could involve

You mean... like the original post? 馃檮

The problem with this issue is that you jumped right to the solution: extending the markdown preview. But that is not a good solution. Using the markdown preview for welcome pages would not create a good experience for users and it would not help extensions easily create good welcome UX. Also the markdown preview exists to preview markdown files; it is not going to become be a generic markdown rendering extension point that extensions can hook into so they can render fancy welcome pages

Instead, share what the end goal for a welcome UX is. Is it education? Telling users about new issues? Soliciting donation? Once we understand the problems and goals, we can work backwards to find a good solution that addresses them.

Ok will do. I mean the real goal so to speak is making sure someone is not lost after they install the new extension and has a point at which to get started with it.

Sorry if I seemed annoyed.

@mjbvz As a reminder to myself and my peers, I brought up the importance of being polite and conscious of how communications are perceived. I agree that there was an XY problem with how this was suggested and that a technical ask could've come after a user story.

I've collaborated with the vscode team on a few PRs over the past few years, maintaining that relationship is important to me and I appreciate your work and patience. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipgiuliani picture philipgiuliani  路  3Comments

vsccarl picture vsccarl  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

shanalikhan picture shanalikhan  路  3Comments

chrisdias picture chrisdias  路  3Comments