After much research, we have determined that for Private Alpha we cannot ship the Help feature as it is currently written. Three changes need to be made to fix things:
First, we need to move the Positron help service from src/vs/workbench/contrib/positronHelp into src/vs/workbench/services/positronHelp. This will allow the Positron help service to be loaded separately from the Help view pane, which may not be loaded when Positron launches. This work has been done (to a basic level).
Second, help URLs need to be displayed inside an Iframe of a wrapper document that is loaded into an OverlayWebview inside the PositronHelpViewPane. This work has also been done (to a basic level). You can see this in the following screen shot (which has debugging color backgrounds to show the various components being displayed). The orange background shows the Iframe of the wrapper document that is loaded into the OverlayWebview:
Thirdly, a new proxy server must be built that sits between the Python and R help servers and the Iframe that is rendering the help URLs. This proxy server will perform various tasks such as script injection and URL rewriting that will allow the Help view pane to send messages to and receive messages from the help content that is being displayed.
The work to complete #3 will take a considerable amount of time to complete. So, for Private Alpha, opening help in Python or R should open the resulting help URL in an external web browser.
After much research, we have determined that for Private Alpha we cannot ship the Help feature as it is currently written. Three changes need to be made to fix things:
First, we need to move the Positron help service from
src/vs/workbench/contrib/positronHelp
intosrc/vs/workbench/services/positronHelp
. This will allow the Positron help service to be loaded separately from the Help view pane, which may not be loaded when Positron launches. This work has been done (to a basic level).Second, help URLs need to be displayed inside an
Iframe
of a wrapper document that is loaded into anOverlayWebview
inside thePositronHelpViewPane
. This work has also been done (to a basic level). You can see this in the following screen shot (which has debugging color backgrounds to show the various components being displayed). The orange background shows theIframe
of the wrapper document that is loaded into theOverlayWebview
:Thirdly, a new proxy server must be built that sits between the Python and R help servers and the
Iframe
that is rendering the help URLs. This proxy server will perform various tasks such as script injection and URL rewriting that will allow the Help view pane to send messages to and receive messages from the help content that is being displayed.The work to complete #3 will take a considerable amount of time to complete. So, for Private Alpha, opening help in Python or R should open the resulting help URL in an external web browser.
Here's a screen recording of that we need:
https://github.com/rstudio/positron/assets/853239/565ced7a-53fd-4231-ba5d-7ea3f03a7668