-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Description
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 thepreviewHtml
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:
-
Start showing users messages if they are using an extension that uses
htmlPreview
(Jan/Feb update?) -
Remove the ability to call
vscode.previewHtml
for recently published extensions. (Jan / Feb update) -
Then remove
vscode.previewHtml
entirely. ( March / April)