Closed jonmmease closed 1 year ago
Oh, and if we add a /view
suffix the chart opens in full screen. This should be an option to the url export functions
In case Vega editor changes their URL API to use a different compression algorithm from this LZ string one that you have here, do you want to add some version argument or method argument or name this method like .to_lz_url()? If we don't do that then we have already used up this name and we won't be able to use it for the long-term function.
Or at least I think we should at least wait for someone to chime in on the Vega editor issue so we get a sense of what their long-term plan is. I think we can wait a couple days to add this feature and that will be worth it
In case Vega editor changes their URL API to use a different compression algorithm from this LZ string one that you have here, do you want to add some version argument or method argument or name this method like .to_lz_url()?
I don't think this is something we need to do right now for future compatibility. The editor is going to need to support the current lz encoding indefinitely to maintain compatibility with all of the share URLs that have already been generated, even if an additional encoding option is added in the future. If a new better encoding is added, like your brotli proposal, then we can add a version
kwarg to vlc.vegalite_to_url
(e.g. vlc.vegalite_to_url(version="2")
), and we can even make that the default. Basically the idea would be for vlc.vegalite_to_url
to return the best URL that is compatible with the current deployed editor, and allow the use of a version
kwarg to opt in to older versions.
Does that make sense?
yes, thanks for walking me through that!
Closes https://github.com/vega/vl-convert/issues/103
Adds Rust, Python, and CLI APIs for converting Vega and Vega-Lite specs into URLs that can be used to open the spec in the Vega editor.
Python example:
https://vega.github.io/editor/#/url/vega-lite/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykBaADZ04JAKyUAjABYplAFYQ2AOxAAaEFBUAzGmTShiNOAHcDmlZhrKGbBhAAScPVjQBmAAweNW5VZt2EADqNAAm9O5eAL5RGqFImCiooMpICHBoIPGJ-FAATEhucAAcAJxMSKWhYqGSAGzFAOzVJfnFoXWeSB5ubiCxWQlIEHCYEObZAvmFJeWV1bUNzWKtee2dHt29aADaoEkgAILqIExoa7H7mQBCJ2eoYmKXIAcAwndo0m7PBwAiH6hSpIfpkAKIA4rAtRXdAAMQBYm+0JemQA4gDJKUQegHBDGtiQABJBF5KIAXQGcGUWlC1n0yRAAA9zLo4IJQpkUBpMABPHAZdDKNgIaxIQT9DQ8lnGdmZM7cvkCkAARwYSD8dASNFI-QGyAATgBrcy8-lypD63VAA