Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecating previewHtml #62630

Closed
3 tasks done
mjbvz opened this issue Nov 6, 2018 · 2 comments
Closed
3 tasks done

Deprecating previewHtml #62630

mjbvz opened this issue Nov 6, 2018 · 2 comments
Assignees
Labels
api engineering VS Code - Build / issue tracking / etc. verification-needed Verification of issue is requested verified Verification succeeded webview Webview issues
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Nov 6, 2018

Problem

The vscode.previewHtml command has been deprecated since the introduction of the webview API. The webview API is significantly easier to work with, correctly supports different filesystem setups, and webviews also offer many security benefits over htmlPreviews. For these reasons, we would like all extensions to switch over the using the webview API and eventually remove the vscode.previewHtml command entirely.

Plan

There are a number of consumers of this API currently, including many extensions that have not been updated in some time. Our goal is to:

  • Prevent new extensions from using previewHtml.
  • Alert existing extension authors to the need to upgrade.
  • Eventually remove previewHtml after the impact on end users has been minimized.

Actions for November 2018:

  • Add notification in VS Code that alerts developers that are using previewHtml. This error would show up when a user is running a development version of an extension in vscode and the previewHtml command is invoked

  • Open issues against existing users of previewHtml (by scanning repos of popular extensions)

  • (Maybe) Update vscode.d.ts to treat vscode.commands.executeCommand('vscode.previewHtml', ....) as a compile warning / error?

Longer term actions

Aggressively targeting March/April for removal. Quick sketch of deprecation process after November:

  1. Start showing users messages if they are using an extension that uses htmlPreview (Jan/Feb update?)

  2. Remove the ability to call vscode.previewHtml for recently published extensions. (Jan / Feb update)

  3. Then remove vscode.previewHtml entirely. ( March / April)

@mjbvz mjbvz added api webview Webview issues engineering VS Code - Build / issue tracking / etc. labels Nov 6, 2018
@mjbvz mjbvz added this to the November 2018 milestone Nov 6, 2018
@mjbvz mjbvz self-assigned this Nov 6, 2018
This was referenced Nov 6, 2018
@mjbvz
Copy link
Collaborator Author

mjbvz commented Feb 1, 2019

Using the previewHtml command in VS Code 1.32 (Feb update) will now show an alert to users. We plan to remove the previewHtml command entirely with VS Code 1.33 (March update).

@mjbvz
Copy link
Collaborator Author

mjbvz commented Mar 25, 2019

For verification: try using the previewHtml command in an extension. This should now fail with an error about no command 'previewHtml' found

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api engineering VS Code - Build / issue tracking / etc. verification-needed Verification of issue is requested verified Verification succeeded webview Webview issues
Projects
None yet
Development

No branches or pull requests

2 participants