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

Fix interactive R and Python plots on Server Web and Workbench #4855

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sharon-wang
Copy link
Member

@sharon-wang sharon-wang commented Sep 30, 2024

Description

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

import plotly.express as px
fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
fig.show()
R

install.packages('plotly')

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant