tht13 / html-preview-vscode

A HTML previewer for Visual Studio Code
MIT License
44 stars 22 forks source link

Feature suggestion #5

Closed vsvyatski closed 8 years ago

vsvyatski commented 8 years ago

Hello, I'm not sure what is the best place to reach you to suggest possible improvements for your extension, therefore I'm typing it right here. In general your extension appears to be quite cool, but I think that perhaps it's possible to improve it allowing to activate the preview like Microsoft does for markdown files. If you open any *.md file with Visual Studio Code (currently version 1.1.1) there is a small button in the top right that says "Open Preview" (it's a tooltip on it), here is the screenshot preview_md

After clicking on it the preview opens and the UI slightly changes allowing you to refresh or go back to the source, here is the screenshot preview_after

Could you consider the activation of your extension that way (of course if Microsoft provides some tools to implement such things, i.e. to tweak the UI of Visual Studio Code)?

tht13 commented 8 years ago

Hi there! I would like to add this but unfortunately there is no API to extend that area of the UI :disappointed: The only UI contribution that can be done is to provide a status bar item in the bottom bar, but as that is a global area that does not feel right to do so.

I am currently working on implementing toggling as they have in the MD previewer (see issue #2) so that should bring the extensions further inline. I also know that microsoft are extracting the MD preview extension from its integrated source code and will instead provide it as an API extension, hopefully once this is done a UI contribution point for that icon may be exposed :smile: although they could also just remove the icon :worried:

For now though you can use the command pallete and or the keyboard shortcuts. I'm sorry I am unable to fufill your request. I will close this for now, but if the ability to do this feature arises in the future I will reopen it.

Thanks for using the extension :smile: !