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
mjbvz opened this Issue Nov 6, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@mjbvz
Copy link
Contributor

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 this to the November 2018 milestone Nov 6, 2018

@mjbvz mjbvz self-assigned this Nov 6, 2018

This was referenced Nov 6, 2018

@kexi kexi referenced this issue Nov 9, 2018

Closed

use webviewapi #88

@kieferrm kieferrm referenced this issue Nov 10, 2018

Closed

Iteration Plan for November 2018 #62876

35 of 45 tasks complete

tomoki1207 added a commit to tomoki1207/vscode-pdfviewer that referenced this issue Nov 13, 2018

Migrate vscode internal api.
`vscode.previewHtml` -> `createWebviewPanel`
due to Microsoft/vscode#62630

@mjbvz mjbvz modified the milestones: November 2018, On Deck Nov 20, 2018

nishiza added a commit to nishiza/superviews-preview that referenced this issue Jan 31, 2019

@mjbvz

This comment has been minimized.

Copy link
Contributor 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.