Commit Graph

115 Commits

Author SHA1 Message Date
Matt Bierner
aeae28bf2c Remove tiff as a supported image preview format
Fixes #81803

This is not supported by chromium
2019-10-01 15:41:56 -07:00
Matt Bierner
c241e1d5e4 Making status bar items for images more reliable
Fixes #81738
2019-10-01 15:05:22 -07:00
Matt Bierner
47ac64a019 Make sure status bar name for zoom/size can be localized 2019-10-01 15:05:22 -07:00
Matt Bierner
b3da545c1d Use enum to track preview state to avoid getting into invalid states such as active & disposed 2019-10-01 15:05:22 -07:00
Matt Bierner
6493b8dc0a Make sure active is set to false when webviews are disposed 2019-10-01 15:05:22 -07:00
Matt Bierner
72c8590b39 Make sure zoom status bar selections only effect the active image
Fixes #81799
2019-10-01 15:05:22 -07:00
Matt Bierner
00b1067cab Add simple description for image preview extension
Fixes #81741
2019-10-01 13:45:00 -07:00
Matt Bierner
eedf80d84b Re-render image preview when image on disk changes
Fixes #81751

Make sure we reload the image in the preview when it changes on disk
2019-10-01 11:57:37 -07:00
Matt Bierner
408a3eb7bb Add loading indicator while image is loading in image preview
Fixes #81571
2019-09-27 14:50:43 -07:00
Matt Bierner
d9950173c1 Draw image border for custom image editor 2019-09-26 16:10:48 -07:00
Matt Bierner
6b947b14ed Fix image preview extension for remote
Fixes #81434

- Make image preview a ui exension

- Add logic so that `asWebviewUri` supports preserving the scheme of the requested resource. This is important as we know where to load the resource from
2019-09-25 16:25:40 -07:00
Matt Bierner
d54dbd33f4 Add icon for image preview ext
Fixes #80677
2019-09-16 16:02:56 -07:00
Matt Bierner
04da82c1d2 Let webview editors show in diff original view too
Fixes #80740

The original view in diff views uses a data uri instead of a resource on disk. Make sure our webview editors can register themselves to handle this case too
2019-09-16 14:17:34 -07:00
Matt Bierner
11c451728a Fix potential race detecting image load 2019-09-13 17:19:57 -07:00
Matt Bierner
011836a150 Prototyping custom editors (#77789)
* Custom Editor exploration

For #77131

Adds a prototype of custom editors contributed by extensions. This change does the following:

- Introduces a new contribution point for the declarative parts of a custom editor
- Adds API for registering a webview editor provider. This lets VS Code decided when to create a webview editor
- Adds an `openWith` command that lets you select which editor to use to open a resource from the file explorer
- Adds a setting that lets you say that you always want to use a custom editor for a given file extension
- Hooks up auto opening of a custom editor when opening a file from quick open or explorer
- Adds a new extension that contributes a custom image preview for png and jpg files

Still needs a lot of UX work and testing. We are also going to explore a more generic "open handler" based approach for supporting custom editors

Revert

* Re-use existing custom editor if one is already open

* Don't re-create custom editor webview when clicking on already visible custom editor

* Move customEditorInput to own file

* First draft of serializing custom editor inputs

* Use glob patterns instead of simple file extensions for matching custom resoruces for custom editors

* Add descriptions

* Try opening standard editor while prompting for custom editor

* Make sure we hide image status on dispose

* Make sure we restore editor group too

* Use glob patterns for workbench.editor.custom

* Allow users to configure custom editors for additional file types

* Use filename glob instead of glob on full resource path

* Adding placeholder for prompt open with

* Add enableByDefault setting for editor contributions

* Enable custom editors by default and add `discretion` enum

Changes `enableByDefault` boolean to a `discretion` enum. This should give more flexibility if we want other options (such as forcing a given custom editor to always be used even if there are other default ones)

* Allow custom editors to specify both a scheme and filenamePattern they are active for

* Rework custom editor setting

* Don't allow custom editors to be enabled for all resources by a config mistake

* Replace built-in image editor with one from extension

* Adding reopen with command

* Improve comment

* Remove commented code

* Localize package.json and remove image

* Remove extra lib setting from tsconfig
2019-09-10 17:56:57 -07:00