posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.61k stars 79 forks source link

For Private Alpha, opening help in Python or R should open the resulting help URL in an external web browser. #1061

Closed softwarenerd closed 1 year ago

softwarenerd commented 1 year ago

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:

Image

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

DavisVaughan commented 1 year ago

Help now opens in a browser window. Video shows it working for R, also tried in Python with ?sorted and that worked too

https://github.com/rstudio/positron/assets/19150088/d8d425aa-f267-41dc-8a17-c61f5ea2c8a0