27 Commits

Author SHA1 Message Date
Johannes Rieken
4a130c40ed
enable @typescript-eslint/member-delimiter-style, https://github.com/microsoft/vscode/issues/140391 2022-02-02 14:35:33 +01:00
Matt Bierner
90b50dc7e2
Use ?. in a few more places 2022-02-01 13:59:12 -08:00
Johannes Rieken
68e819043c
use tsconfig.json#include for vscode.d.ts and vscode.proposed.d.ts, enables to remove most ref.d.ts-files 2021-11-09 15:53:35 +01:00
Johannes Rieken
9254a8cd27
move vscode.d.ts and vscode.proposed.d.ts into src/vscode-dts-folder, https://github.com/microsoft/vscode/issues/131165 2021-11-09 15:00:03 +01:00
Matt Bierner
62d631a165
Add serializer for simple browser
Fixes #119057
2021-10-07 16:49:33 -07:00
Matt Bierner
0e52275271
Introduce WebviewOptions.forms
Fixes #132157
2021-09-02 13:24:49 -07:00
Matt Bierner
cd48aa9544
Remove @types/node dep for simple browser
This package does not use any node modules
2021-07-22 17:16:33 -07:00
Matt Bierner
5b8ce768f3
Add getNonce function to generate webview nonces 2021-07-13 10:02:24 -07:00
Alex Ross
2894338f38
Add all valid hosts to simple browser (#120929)
and pass sourceUri not targetUri
2021-04-09 16:54:31 +02:00
Matt Bierner
73ae56b82b
Build with latest TS nightly (#120690)
* Pick up new TS 4.3

Also tests adding override keywords for extensions as part of #120675

* Update to daily TS and workaround TS 4.3 issue

Works around https://github.com/microsoft/TypeScript/issues/43578
2021-04-07 12:19:05 -07:00
Jean Pierre
8117fec7df
Fixes #120036 (#120275) 2021-04-06 15:29:36 -07:00
Matt Bierner
87a3effc79 Try to disable caching in the simple browser's iframes 2021-02-08 21:31:04 -08:00
Matt Bierner
46e28e3bbe Copy codicon files directly into sources instead of taking a non dev dependecy on the entire package 2021-02-08 14:27:16 -08:00
Matt Bierner
542de8e009 Move schemes to opener metadata 2021-01-21 14:41:25 -08:00
Matt Bierner
d87041edde Downgrade simple browser to prompt instead of being the default on web
We need more testing in codespaces before enabling it automatically
2021-01-15 10:38:50 -08:00
Matt Bierner
6cceb4eab0 Remove enabled setting and try to open simple browser to side of current editor 2021-01-14 17:06:14 -08:00
Matt Bierner
cc5e8b22fa Continue work on url opener api
For #109277

- Add `option` opener priority. This means the oper will only be shown if requested but will not replace the default opener
- Persist registered openers for IntelliSense suggestions
2021-01-14 17:06:14 -08:00
Matt Bierner
5d6cba5cbc Reworking external opener implementation to allow configured openers to be called directly without a canOpen check
If the user has configured a specific external uri opener, we should always try to use that without first calling `canOpen` to filter down the list of openers.

This change also adds `ExternalUriOpenerEnablement` which allows an opener to mark itself as the preferred opener for a given uri. If only a single preferred opener is returned, it will be used automatically for that uri (although user configuration can override this)
2021-01-14 10:37:00 -08:00
Matt Bierner
b7f9eddf04 Allow passing viewColumn to simpleBrowser.api.open 2021-01-13 16:56:39 -08:00
Matt Bierner
47aa3ad09a Continue work on opener service
- Add error notification if opener throws an exception
- Add public facing id to openers. This is used in settings
- Add intellisense for the opener id setting
2021-01-13 12:53:18 -08:00
Matt Bierner
47a135e715 Rework opener api proposal
For #109277

- Add more explicit two phase structure to api
- Make opener pass along label when registered
2021-01-12 16:14:42 -08:00
Matt Bierner
0949d5b794 Remove unused var 2021-01-07 17:52:06 -08:00
Matt Bierner
acda4aed82 Make the external opener a two phase process
This changes makes a few changes to the openers:

- Move the opener prompting from the extension host into the main thread
- Make the external opener process two phases: get openers and then open. This would let us skip the trusted domain validation for extension handled links if we want to in the future
- Add lifecycle to commands used by the uri opener

For #109277
2021-01-07 17:42:12 -08:00
Matt Bierner
e2c305f3a3 Allow registering additional external uri openers
This change moves the extension uri opener contribution point to instead use the internal `IExternalOpener` api instead of the more generic `IOpener` api. This is required since external uri openers should see the resolved uri that has gone through port forwarding, not the raw uri that the user clicked on
2021-01-07 11:41:07 -08:00
Matt Bierner
809d2f63d0 Added show options to simple browser open command 2021-01-06 12:17:36 -08:00
Matt Bierner
2fed7ba374 Adding settings to control which schemes simple browser is enabled for
Also adds a setting to enable/disable the focus lock indicator
2021-01-06 12:17:36 -08:00
Matt Bierner
3ed300eb9d
Add simple browser extension (#109276)
* Add support for TS's Hierarchical refactorings API

https://github.com/microsoft/TypeScript/pull/41975

* Add simple browser extension

This change adds a new 'simple browser' extension. This extension uses a webview to render webpages directly in VS Code. We plan on using it for optionally previewing local servers in both desktop and codespaces

The browser itself has a number of limitations due to the security around iframes:

- It traps keyboard focus
- We can't detect if a page fails to load
- We can't track the current url of the iframe

* Add experimental alert when the iframe is focused

* Disable events on focus warning

* Hooking up simple browser to opener
2021-01-04 19:06:53 -08:00