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

No access to local files in interactive vega blocks #414

Open
kachkaev opened this issue Sep 5, 2020 · 2 comments
Open

No access to local files in interactive vega blocks #414

kachkaev opened this issue Sep 5, 2020 · 2 comments

Comments

@kachkaev
Copy link
Collaborator

kachkaev commented Sep 5, 2020

There seems to be some access issue in the VSCode preview. When an interactive vega block refers to a local file, the request fails. To reproduce:

  1. Create data.csv with the following contents:

    x,y
    10,55
    20,35
    30,80
    
  2. Create problem.md with the following contents:

```vega-lite
{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "data": { "url": "data.csv" },
  "encoding": {
    "x": { "field": "x", "type": "quantitative" },
    "y": { "field": "y", "type": "quantitative" }
  },
  "mark": "circle"
}
```

```vega-lite interactive
{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "data": { "url": "data.csv" },
  "encoding": {
    "x": { "field": "x", "type": "quantitative" },
    "y": { "field": "y", "type": "quantitative" }
  },
  "mark": "circle"
}
```

Result

Screenshot 2020-09-05 at 15 41 21

Expected result

Screenshot 2020-09-05 at 14 41 36

↑ the same example works correctly in Atom

I’m wondering if there is any flag we can tweak while using VSCode API to allow access to local files 🤔

@shd101wyy
Copy link
Owner

It might be related to the file protocol change but I am not exactly sure. They seem to change to use vscode-webview-resource:// or something...

@jwoLondon
Copy link

Do you think this looks like a solvable problem? Currently this is causing a significant block at our end.

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

No branches or pull requests

3 participants