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
This removes the initial notebook renderer API and keeps the 'pure'
renderer API described in #102644 and hacked-in previously.
Remaining work in this area, in no particular order:
- Add messaging context to postMessage as requested by Don (API proposal TBA)
- Cleanups around how state is managed internally in the backLayerWebView
- Deprecate the renderer `viewType` in favor of calling it the `id` or `rendererId`
Q: I kept around some of the "transform" functions since the mime type
picking happens there, not sure if there's a better place for this
to happen now, or whether these methods should simply be renamed.
* refactor: use array of resources
* refactor: use an array of uricomponentspair
* feat: move many resources
* refactor: rename data to files
* feat: use array of files for copy
* refactor: use move with multiple resources
* refactor: use move method with array of files
* refactor: rename data to files
* feat: moveOrCopy array of resources on paste
* refactor: use concise loop syntax
* test: assert number of events
* refactor: rename uricomponentspair
* support multiple files on WorkingCopyFileEvent
* feat: support multiple resources
onWillRunWorkingCopyFIleOperation onDidRunWorkingCopyFileOperation
* refactor: make source optional for consistency
* refactor: support resources for delete
* test: isolate tests
* fix: iterate over resources
* feat: support operations on delete
* feat: adopt deleting multiple resources
* fix: typing and sequential flow of copyservice
* fix: typing and naming
* fix: typing and naming
* fix: use different message for multiple overwrites
* refactor: naming consistency
* fix: use array resources
* fix: message for multiple overwrites
* fix format
* clean up working copy file service
* refactor multiple overwrites message helper
* use openeditors to bulk open
* split drop copy and move
* add returns
Co-authored-by: Benjamin Pasero <benjpas@microsoft.com>
* notebooks: pipe renderer API postmessages to the renderer itself
Previously the postMessage on acquireNotebookRenderer API was just
a proxy to the global vscode postmessage. Now, it's linked to the
renderer and will cause an optional `onDidReceiveMessage` method on
the renderer to be called.
The message still _also_ goes to the global webview message handling
for advanced use cases, but this change allows the webview<->renderer
communication to be more nicely contained
and separate for most use cases.
* wip
* fixup! pr comments