posit-dev / positron

Positron, a next-generation data science IDE
Other
2.51k stars 79 forks source link

Positron Web: cannot save plots #4800

Open testlabauto opened 2 weeks ago

testlabauto commented 2 weeks ago

System details:

Positron and OS details:

Dev build on Sep 24, 24 at noon MST.

Interpreter details:

All Python and R as far as I can tell.

Describe the issue:

Unable to save plots for R and Python with the web version of Positron.

Steps to reproduce the issue:

Attempt to save any plot.

Expected or desired behavior:

Possible to save plot.

Were there any error messages in the UI, Output panel, or Developer Tools console?

image
timtmok commented 15 hours ago

This and #4840 need some special handling for picking files and folders. We should be using vscode-remote URIs. Any of the file service code will treat these URIs as server-side.

The actual switch to using the vscode-remote schema is simple. The special handling requires a file picker that works with our modal dialog implementation. The file picker that we inherit from upstream knows to show a native dialog for local files and a SimpleFileDialog for remote files. Unfortunately, this dialog is anchored to the active window, which means it is layered underneath our modal div overlay and is always displayed at the top center of the workbench.

It would be best to reuse as much code as possible to avoid re-writing a new file picker.