REditorSupport / REditorSupport/vscode-R

Variable (data.frame) and Plot view was not rendered correctly in Safari web-browser

Open
#1,546 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

Describe the bug
I have set up a VSCode Tunnel on my Mac, which allows me to access Visual Studio Code and utilize various extensions, such as vscode-R, through a web browser via a specific URL. This setup enables me to view and interact with variables in an R session seamlessly when using Microsoft Edge. However, I’ve encountered specific issues when using Safari on both Mac and iPad:

  • When attempting to view R variables using the View(variableName) function, a blank window appears in the preview pane. This issue is consistently observed only in Safari. In contrast, Microsoft Edge displays the data frame correctly as a table.
  • The plot appears when viewed in Safari, but none of the interactive control buttons function. Additionally, the thumbnail images at the bottom of the main figure, which allow for plot selection, are missing. This functionality works as expected in Microsoft Edge.

This problem seems to be related to a compatibility issue with Safari and its underlying WebKit architecture, which may affect the rendering and interaction capabilities of web-based applications like VSCode Tunnel.

To Reproduce
Steps to reproduce the behavior:

  1. Setup:
    • Open VSCode through a VSCode Tunnel URL in Safari on Mac or iPad.
    • Ensure the vscode-R extension is installed and active.
  2. Accessing R Variables:
    • Execute an R script that generates variables (e.g., a data frame).
    • Attempt to view the variables using the View(variableName) command in the R session.
  3. Previewing Plots:
    • Generate a plot in the R session, such as plot(norm(1000)).
    • Attempt to interact with the plot using control buttons or view thumbnail selections.

Can you fix this issue by yourself? (We appreciate the help)
No

(If yes,) can we assist you with anything?

(If applicable) Please attach setting.json

    "r.bracketedPaste": true,
    "r.helpPanel.cacheIndexFiles": "Workspace",
    "r.plot.useHttpgd": true,
    "r.rterm.mac": "/Library/Frameworks/Python.framework/Versions/3.10/bin/radian",
    "r.plot.defaults.colorTheme": "vscode",
    "liveServer.settings.donotShowInfoMsg": true,
    "jupyter.allowUnauthorizedRemoteConnection": true,
    "r.rpath.mac": "/usr/local/bin/R"

Expected behavior
Variables and plots should display correctly and interactively in Safari, similar to the behavior observed in Microsoft Edge. Users should be able to view R variables as tables and interact with plot control buttons and thumbnails without any issues.

Screenshots
Screenshot 2024-07-25 at 11 30 49 AM

plotIssue

Environment (please complete the following information):

  • OS: macOS
  • VSCode Version: 1.91.1
  • R Version: 4.4.1
  • vscode-R version: v2.8.4

Additional context

  • I have tested this issue across different versions of Safari and on multiple devices (Mac and iPad), confirming that the problem persists consistently.
  • No similar issues have been observed when using other browsers, indicating that the problem is likely isolated to Safari’s handling of certain web technologies used by the VSCode Tunnel or the vscode-R extension.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the View(variableName) and plot interactions through a VSCode Tunnel in Safari, then compare the same steps in Edge and inspect the vscode-R variable and plot views. Done means data-frame tables, plot controls, and thumbnails work in Safari on the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.