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 Vega downloads and download URLs in general #7022

Merged
merged 2 commits into from Aug 16, 2019

Conversation

jasongrout
Copy link
Contributor

References

Fixes #7017

See also vega/altair#1651

Code changes

Two main things:

  1. Fix getDownloadUrl to correctly append the xsrf token. This also fixes the problem we were seeing earlier with Chrome not picking up the right file name.
  2. Fix the vega extensions to use getDownloadUrl to directly get the urls it needs to fetch server-side resources.

User-facing changes

Vega plots with json transforms now work.

Backwards-incompatible changes

None.

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

Before, we would get URLs like http://example.com/files/file.txt/?_xsrf=token, and now the slash after file.txt is eliminated.
…rver.

Perhaps we should also use the services package to actually send the request to the server. That would complicate these plugins beyond simple rendermime plugins, though.

Fixes jupyterlab#7017
@jasongrout
Copy link
Contributor Author

CC @domoritz for a sanity check on how we are overriding the vega sanitizer.

@jasongrout jasongrout added this to the 1.1 milestone Aug 15, 2019
@jasongrout
Copy link
Contributor Author

This should be backported to 1.0.x once it is merged.

@jasongrout jasongrout changed the title Vega download path Fix Vega downloads and download URLs in general Aug 15, 2019
Copy link
Member

@domoritz domoritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I wanted to test this on binder but got an error.

Screen Shot 2019-08-16 at 11 09 09 AM

@jasongrout
Copy link
Contributor Author

Looks good to me. I wanted to test this on binder but got an error.

You clicked on the "launch binder" link above?

@domoritz
Copy link
Member

Yes

@jasongrout
Copy link
Contributor Author

Yes

I'm seeing the same thing. Someone on another issue said that Binder is having issues right now.

@blink1073
Copy link
Member

LGTM, thanks!

@blink1073 blink1073 merged commit dbf94a5 into jupyterlab:master Aug 16, 2019
@blink1073
Copy link
Member

@meeseeksdev backport to 1.0.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyterlab that referenced this pull request Aug 16, 2019
blink1073 added a commit that referenced this pull request Aug 16, 2019
…2-on-1.0.x

Backport PR #7022 on branch 1.0.x (Fix Vega downloads and download URLs in general)
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Sep 15, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect URL for Vega data files
3 participants