Commit Graph

101 Commits

Author SHA1 Message Date
Logan Ramos
9350fa3c9d Bump telemetry module to fix packaging 2021-08-02 14:29:37 -04:00
Logan Ramos
b7a07daa5a Fix #129727 2021-08-02 13:04:26 -04:00
Logan Ramos
87e0cb1d43 Fix #129474 2021-07-29 11:39:03 -04:00
Logan Ramos
c8e6d08e3a Update to the latest extension module 2021-07-26 13:44:43 -04:00
Matt Bierner
560877f625 Don't include @types/node in image-preview extension 2021-07-22 17:19:07 -07:00
Matt Bierner
475370b7c9 Check if process exists 2021-07-19 14:14:38 -07:00
Martin Aeschlimann
7927075f89 Merge pull request #128545 from microsoft/joh/webpack5
Adopt webpack 5
2021-07-14 22:32:54 +02:00
Matt Bierner
5b8ce768f3 Add getNonce function to generate webview nonces 2021-07-13 10:02:24 -07:00
Martin Aeschlimann
7ebe6a6054 adopt web extensions to webpack 5 2021-07-08 21:41:03 +02:00
Benjamin Pasero
159479eb5a Allow to show status bar entries with an id and name (fix #74972) 2021-05-19 14:03:37 +02:00
Sandeep Somavarapu
ac151b40a5 enable virtual workspace capability 2021-04-23 10:20:23 +02:00
SteVen Batten
f9fc28d47d update ext manifest schema validation and built-in exts 2021-04-21 11:54:42 -07:00
Miguel Solorio
ac48f78dd6 Add icons for built-in extensions (fixes #81760) 2021-04-20 12:09:24 -07:00
Matt Bierner
a5d656cd3f Configure workspace trust for simple browser and image preview 2021-04-14 20:37:01 -07:00
Matt Bierner
119581fc2a Use more standard name for shared extension tsconfig
This enables Intellisense in the `tsconfig.base` file
2021-04-12 15:58:38 -07:00
Matt Bierner
9c9e188aa0 Don't use 'self' for image editor csp
On desktop, we now serve webview resources from a different origin than the webview itself. This means we no longer can use `'self'` in our CSP as shorthand and instead should always use the provided `cspSource`
2021-04-08 17:08:08 -07:00
SteVen Batten
9c00242866 updating telemetry module for built-in exts 2021-03-22 16:28:08 -07:00
Matt Bierner
5f24ec84ac Use correct new context name 2021-03-03 10:57:24 -08:00
Matt Bierner
623741272a Add activeCustomEditorId context
Fixes #113511

This tracks the id of the currently active custom editor

This change also removes the 'customEditors' context. This was an old context specific to custom editors and has since been replaced by the more generic `activeEditorAvailableEditorIds` context
2021-03-02 12:30:28 -08:00
Benjamin Pasero
e4364e5f5d fix #117254 2021-02-23 08:27:52 +01:00
João Moreno
ec805db5ed add repository field to extensions package.json 2021-01-29 15:30:45 +01:00
Matt Bierner
ea13176ee9 Enable image preview for avif images
Fixes #106415

Support for these was added in electron 11
2021-01-13 13:52:34 -08:00
Matt Bierner
61f799f53b Add proposed webview view API (#104601)
Add proposed webview view API

For #46585

This adds a new `WebviewView` proposed api to VS Code that lets webview be used inside views. Webview views can be contributed using a contribution point such as :

```json
    "views": {
      "explorer": [
        {
          "type": "webview",
          "id": "cats.cat",
          "name": "Cats",
          "visibility": "visible"
        }
      ]
    },
```

* Use proper activation event

* Transparent background

* Fix resize observer

* Adding documentation

* Move webview view to new directory under workbench

* Remove resolver

By moving the webviews view into their own fodler, I was able to avoid the cycle the resolver was originally introduced for

* Use enum in more places

* Hook up title and visible properties for webview views

* Remove test view

* Prefer Thenable

* Add unknown view type error to collector
2020-08-20 13:59:22 -07:00
Alex Dima
91cdca1bdb Do not ship unnecessary files with extensions 2020-07-24 13:57:51 +02:00
Alex Dima
2fa41fb23e Add "web" as extensionKind to extensions which support this 2020-07-24 10:41:03 +02:00
Martin Aeschlimann
16be2c9885 used shared webpack-config for browser 2020-06-25 23:22:02 +02:00
Martin Aeschlimann
917064c80c move polyfills to build/polyfills 2020-06-11 21:54:43 +02:00
Matt Bierner
0145e38e5f Enable the image preview in web/serverless
Fixes #99802
2020-06-10 16:44:10 -07:00
Matt Bierner
263baa79b0 Use extensionUri instead of Uri.file 2020-06-10 16:44:10 -07:00
Matt Bierner
eb09996238 Move custom editor provider out of proposed to main api
For #77131
2020-06-01 14:45:05 -07:00
Matt Bierner
7a4880a6bd Add some extra guards around image loading 2020-05-27 19:56:02 -07:00
Christos Pappas
03beeec722 Prevent aggressive image name encoding (#96935)
* Prevent aggressive image name encoding

* Fix typo on function name

Changes getWebiewContents to getWebviewContents in image-preview extension
2020-05-11 15:21:16 -07:00
Matt Bierner
4862602c4c Align custom editor API proposal with notebook API
Fixes #95854
Fixes #95849
For #77131

- Move all editing functionality back onto the provider. This better matches the notebook API.

- Rename `CustomEditorProvider` to `CustomReadonlyEditorProvider`.  `CustomEditorProvider` is now how editable custom editors are implemented

- Give extension a full suggested backup path instead of just a folder
2020-04-24 14:47:08 -07:00
Matt Bierner
f35758ab21 Rename supportsMultipleEditorsPerResource -> supportsMultipleEditorsPerDocument
For #77131
2020-04-23 17:33:06 -07:00
Matt Bierner
5913061e1b Allow a custom editor to opt out of supporting multiple instances for a single resource
#77131
2020-04-16 17:40:20 -07:00
Jackson Kearl
9d8bf6d842 Clean up services required 2020-04-09 06:17:48 -07:00
Matt Bierner
d4ce7148dd New custom editor API proposal
For #77131

Fixes #93963
Fixes #94515
Fixes #94517
Fixes #94527
Fixes #94509
Fixes #94514
Fixes #93996
Fixes #93913

This removes explicit edits from the API and reshapes the API to more closely match VS Code's internal API. The change also tries to better express the lifecycle of backups
2020-04-08 17:53:39 -07:00
Matt Bierner
2e4d797e51 Add registerCustomEditorProvider2
Create a temporary overload for testing `CustomEditor`. In finalization, we'd update `registerCustomEditorProvider` to take both types of custom editor instead
2020-04-02 15:43:13 -07:00
Matt Bierner
d41997790c Remove CustomDocument.viewType
Fixes #93867
For #77131

This property is no longer needed (or very helpful) with the current api design
2020-03-31 12:00:17 -07:00
Matt Bierner
579dab3196 Update custom editor api
For #77131

- Use a class for `CustomDocument` instead of an interface. Extensions can now add their own data to a `CustomDocument` by sublassing

- Renamed `resolveCustomDocument` to `openCustomDocument` and require that extensions return a `CustomDocument`

- Exposed edits on `CustomDocument`

- Made the third parameter of `registerCustomEditorProvider` a generic options bag that takes a `webviewOptions`
2020-03-23 13:10:49 -07:00
Matt Bierner
9dae408dc3 Switch webview api back to use delegate model
For #77131

Going back the the delegate based model for a few reasons:

- It gives us a better approach to add additional API hooks in the future (such as for rename)

- In practive, the capabilities were almost always the same as the `userData` on the document. It is rather confusing to have both `userData` and the capabilities 'on' the document
2020-03-12 16:54:48 -07:00
Matt Bierner
dc68e6578e rename custom editor activation event
For #77131

Renames the activation event from `onWebviewEditor` to `onCustomEditor` to be consistent with the reset of the API
2020-02-26 10:59:36 -08:00
Matt Bierner
dc1e7871b8 Rename custom editor contribution point
Renaming to match new API proposal
2020-02-25 10:55:41 -08:00
Matt Bierner
8291f8c152 Polishing of custom editor api proposal for 1.43 release
For #77131
2020-02-25 10:55:41 -08:00
Matt Bierner
99d5733e5f New iteration of webview editor API proposal
For #77131

**Motivation**
While our existing webview editor API proposal more or less works, building an editable webview editor is fairly tricky using it! This is especially true for simple text based editors.

It'd also be nice if we could get bi-directional live editing for text files. For example, if I open the same file in a webview editor and in VS Code's normal editor, edits on either side should be reflected in the other. While this can sort of be implemented using the existing API, it has some big limitations

**Overview of changes**
To address these problems, we've decided have two types of webview editors:

- Text based webview editors. These editors used a `TextDocument` as their data model, which considerably simplifies implementing an editable webview. In almost all cases, this should be what you use for text files

- Complex webview editors. This is basically the existing proposed API. This gives extension hooks into all the VS Code events, such as `save`, `undo`, and so on. These should be used for binary files or in very complex text editor cases.

Both editor types now have an explicit model layer based on documents. Text editor use `TextDocument` for this, while custom editors use `WebviewEditorCustomDocument`. This replaces the delegate based approach previously used.
2020-02-21 16:26:01 -08:00
Joao Moreno
a398adac13 revert git uri changes
fixes #88775
2020-01-22 15:29:13 +01:00
João Moreno
99d2801fa5 Merge branch 'master' into fix-gitfs-stat 2020-01-13 15:31:00 +01:00
Matt Bierner
a0328d26ac Add 'vscode.reopenWith' API command
Fixes #88426

Add an api command that allows extensions to open/reopen a file with a specific we custom editor. Use this to allow re-opening a failed to load image as text/binary

For #77131
2020-01-10 14:25:21 -08:00
Matt Bierner
8e475f9b24 Implement draft 2 from #86802 (#87117) 2019-12-16 14:18:58 -08:00
Matt Bierner
fb2eca62c2 Show empty image instead of error in git diff view for newly staged images
Fixes #86389
Fixes #86776

Uses `fs.stat` to check if we are showing an untracked image in the git diff view.

Also required fixing `stat` for `gitfs` so that it can try to return the proper sizes for objects
2019-12-11 15:41:01 -08:00