-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix interactive R and Python plots on Server Web and Workbench (#4855)
### Description - part of #4274 - addresses #4804 - should unblock #4806, where the new plotly rendering method relies on a proxy server instead of an HTML file proxy #### Changes - add a new command to create a generic proxy server `positronProxy.startHttpProxyServer` - rename the command `positronProxy.stopHelpProxyServer` to `positronProxy.stopProxyServer` since it is not help-specific - rename `resources/scripts.html` to `resources/scripts_help.html` since it is help-specific - move the src/href rewriting to a private reusable function `rewriteUrlsWithProxyPath`, which is now used by the generic http proxy and the help proxy `contentRewriter` - update `src/vs/code/browser/workbench/workbench.ts` to resolve the uri while maintaining the uri's original path, query string and fragment strings (NOTE: needs to be contributed upstream) - update `src/vs/workbench/services/languageRuntime/common/languageRuntimeUiClient.ts` to choose between starting an HTML file proxy if a file is being served or a generic http proxy if the content is not a file ### QA Notes On Server Web and Workbench, running the following in the corresponding consoles: ##### Python `pip install plotly nbformat pandas` ```python import plotly.express as px fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2]) fig.show() ``` ##### R `install.packages('plotly')` ```r library(plotly) fig <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length) fig ``` #### Expected Result The corresponding interactive plots should display in the plots pane and be interact-able!
- Loading branch information
1 parent
4351851
commit 833a9b3
Showing
7 changed files
with
108 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters