Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webview via Extensions #21208

Open
1 task done
notpeter opened this issue Nov 26, 2024 · 3 comments
Open
1 task done

Webview via Extensions #21208

notpeter opened this issue Nov 26, 2024 · 3 comments
Labels
enhancement [core label] extension infrastructure Feedback for extensions APIs, creation, management, etc

Comments

@notpeter
Copy link
Member

Check for existing issues

  • Completed

Describe the feature

A number of VSCode plugins are implemented as shim atop a webview.

This can be used to support simple things like Preview panes (e.g. image/PDF/SVG preview) up through through full interactive web applications which dynamically edit an underlying file.

Example requests which could potentially implement with this extension interface:

Environment

N/A

If applicable, add mockups / screenshots to help present your vision of the feature

No response

@notpeter notpeter added enhancement [core label] triage Maintainer needs to classify the issue admin read Pending admin review extension infrastructure Feedback for extensions APIs, creation, management, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 26, 2024
This was referenced Nov 26, 2024
@huacnlee
Copy link
Contributor

huacnlee commented Nov 26, 2024

I have made this change for WebView support. And we are already used those changes to integration WebView in our application.

huacnlee#6

There still have a big problem:

  • The WebView will always render on top of the GPUI elements.
    • So we are limited our UI, to let the WebView render in a Drawer or a Modal to make sure no other GPUI elements render on top of it (e.g.: PopupMenu, Tooltip ...).
  • On Linux with Wayland, the Wry can't be as a child window to use.
    • So ... we disable it in our application on Linux.

@notpeter
Copy link
Member Author

notpeter commented Nov 26, 2024

There will definitely need to be significant work as for how to expose this the API in a platform agnostic way (e.g. bundle Chromium everywhere? Use native Safari WebView on Mac, Edge WebView2 on Windows, ?? on Linux) as well as the specific ergonomics/safety of the Extension API so that extensions can leverage it and Zed can support this as a stable API in the long-term.

Thanks for the link @huacnlee, it's exciting to see a proof-of-concept.
But I want to manage expectations -- there is still significant work to be done here and it's likely still a ways off.

@mocenigo
Copy link

mocenigo commented Dec 5, 2024

Something like skia-canvas would be good to get a nt
Html canvas. Since the backend is separated I think it could be ported atop of GPUI. With JS and TS also compiling to wasm, I think this could allow fast porting of several VSCode extensions (imagine having draw.io).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] extension infrastructure Feedback for extensions APIs, creation, management, etc
Projects
None yet
Development

No branches or pull requests

3 participants