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

add support for the latest Vega v5.x releases #19

Closed
RandomFractals opened this issue Mar 18, 2019 · 8 comments
Closed

add support for the latest Vega v5.x releases #19

RandomFractals opened this issue Mar 18, 2019 · 8 comments
Labels
enhancement New feature or request

Comments

@RandomFractals
Copy link
Owner

currently this extension provides vg.json and vl.json Previews using embedded Vega v4 and Vega-Lite v3 libraries.

Vega dev team, @jheer and @domoritz have been busy with new Vega v5 updates recently.

I'd like to support latest Vega library updates to Preview vega json files created with new features and changes in v5.x. See Vega repo for more info:

https://github.com/vega/vega/releases

Ultimately and ideally as part of this viewer update, load correct vega, vega-lite or vega-embed version for Preview based on the Vega $schema reference provided in vg.json || vl.json spec for backward compatibility and previews of older vega specs.

@RandomFractals
Copy link
Owner Author

@jheer & @domoritz I am not sure there is a point in adding multi-v switch since I've seen both vega specs v4 & 5 working with this latest update and your latest libraries.

I am closing this for now.

@domoritz
Copy link
Contributor

I would like to use a local version during development. This would be similar to vscodes support for local typescript.

@RandomFractals
Copy link
Owner Author

RandomFractals commented Apr 18, 2019

I still don't get what you mean by that 'local' vega libs part. There is no such thing as local vega js libs. I've tried to make that happen with Vega Viewer tho.

TS comes packaged with vscode, and extensions can link the TS v. they use or pull, and I already do that in this ext. since it's coded in TS.

However, how do you see this work with vega libraries? I thought inspecting vega json, pulling $jsonSchema refs & linking corresponding vega and vega-lite libs in my vega.preview.html template was the way to go.

I still need to know that mapping tho. Does vega Editor do it today? Can you link me to that setup to see how you handle it online?

Also, what older vega || vega-lite examples/specs don't work with the current setup in this ext?

I've tested latest v. with your older vega json examples and did not find a single spec that failed to render.

I could easily inject diff. ${scripts} dir path and embed all the diff. versions of your vega libs in my /scripts dir, but I still need more info on that $jsonSchema to vega libs mapping...

@domoritz
Copy link
Contributor

In the Vega editor, I use yarn link to connect the current dev version. This way I can make changes to Vega and Vega-Lite and still try them in the Editor. Does this explain my use case?

@RandomFractals
Copy link
Owner Author

RandomFractals commented Apr 18, 2019

nope. I do the same in my package.json, but the Preview pulls your libs from /scripts dir.

I hope that explains it on my end.

Please provide mapping from your older json schema's to your vega lib releases, and I'll add support for older vega json specs.

I'd rather do it for all versions in the wild you think devs might need to use for their vega || lite charts previews.

@RandomFractals
Copy link
Owner Author

also, if you want to do it in Vega Viewer the way you describe it, then you can run dev build of this extension and change those vega lib references as you see fit.

I just don't think it's what any vega charts dev would do. Does that make it work for you?

See Dev Build section in my readme :)

@domoritz
Copy link
Contributor

Sounds good. The mapping is at https://github.com/vega/schema/tree/master/vega-lite (see the symlinks). We follow semantic versioning practices.

@RandomFractals
Copy link
Owner Author

RandomFractals commented Apr 19, 2019

thanks for that mapping link.

I can make a change to pull scripts from node_modules direct, but then we can't support diff. vg & vl lib versions per spec schema reference I was planning to add eventually. why I created that scripts dir in the 1st place thinking we can add version dirs to it.

would love other devs using vega or working on vega pitch in on this change and make it work for all, core vega viz team & devs using them.

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

No branches or pull requests

2 participants