madskristensen / HtmlTools

A Visual Studio extension
Other
8 stars 6 forks source link

Image preview is broken in some cases #1

Open DarkDaskin opened 7 years ago

DarkDaskin commented 7 years ago

Installed product versions

Description

For some values of an img src attribute image preview is displaying incorrectly. See screenshots.

Steps to recreate

  1. Open a web application project in VS.
  2. Open some Razor view.
  3. Hover img src attribute.

Current behavior

  1. For relative URLs the image is shown as expected. local src preview
  2. For HTTP URLs "no image" placeholder is shown with an error below (the URL works in a browser). HTTP src preview
  3. For Razor expressions "no image" placeholder is shown, but it covers the whole window and makes editing almost impossible. expression src preview

Expected behavior

For valid HTTP URLs the image should load correctly. For invalid HTTP URLs an error should be shown with correct layout. For non-URLs nothing should pop up.

It seems that the easiest way to fix that is to remove the "no image" placeholder. It does not add much value over a simple text tool tip.