Skip to content

JetBrains: Add initial web view modal setup

Warren Gifford requested to merge ps/jetbrains-webview-modal into main

Created by: philipp-spiess

Part of #34366 (closed)

This is the first PR to merge back our prototype changes from ps/jetbrains-demo into main. In this PR we:

  • Change the keybind for the current open file action
    • Not sure if this is good or bad but I've gotten used to alt + a for opening the modal. I figured that if we have users that are used to alt + a for the old behavior they now get a free reminder of our new features when they update :P I've changed the existing keybind to alt + shift + a.
  • Create the base setup to load a modal view with a split screen of web view + editor.
  • Create a service to hold the reference to the web view so that we can reuse it when the modal is closed?
  • Add the basic scheme handler to load files from the resources folder. For now this supports .html, .css, and .js.

cc @madppiper (I can't tag you for review directly 😢 )

Known issues

  • There's a quick white flash when the web view is loaded the first time.
  • You can open more than one popover by pressing alt + a multiple times (this should probably not do anything when the modal is still shown).

Test plan

Verified manually on macOS AArch64:

https://user-images.githubusercontent.com/458591/165087407-e602b18c-9f9f-451c-b61d-45647c115836.mov

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading