JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
887 stars 104 forks source link

Upgrade vega #263

Open pkimbrel opened 7 years ago

pkimbrel commented 7 years ago

Updated Vega to 2.6.3 to support new features (more plots to come)

Updated D3 to 3.5.17 (could not go to 4 as Vega does not yet support it)

Modified both worksheet.html and view.html to pull in new versions.

NOTE: This requires changes to gorilla-plot which will be in a separate pull request.

jonathanj commented 7 years ago

It would really be fantastic to upgrade to a newer version of Vega, it's a bit sad that this PR has languished for close on a year. @JonyEpsilon Is there anything one might be able to help with to get a PR like this reviewed and merged?

@pkimbrel I do have a question: There are several backwards incompatibilities introduced between Vega 1.x and Vega 2.x (and Vega 3.x which is now available): https://github.com/vega/vega/wiki/Upgrading-data-transforms-to-2.0 https://github.com/vega/vega/wiki/Upgrading-to-2.0

Is it at all possible to avoid breaking the worksheets of users who have written their own Vega definitions?

pkimbrel commented 7 years ago

@jonathanj That's the beauty of the Gorilla REPL architecture. The Gorilla-Plot acts as an abstraction layer between the worksheets and the Vega grammar. So as the Vega grammar evolves (which it has), you can map the data structure in Gorilla to the new Vega grammars. I was able to upgrade without breaking previous worksheets while still adding new functionality to Gorilla.

JonyEpsilon commented 7 years ago

I'm not actively maintaining Gorilla REPL at the moment, but @benfb is keeping things ticking over. I don't know what his priorities are, but he might be able to be convinced to merge this.

I would worry about compatibility though ... I think if a Vega literal is embedded in the worksheet with syntax that has been broken, then the renderer will fail. I don't know what the breaking changes are, so I'm not sure how much of a problem it will be in practice.

jonathanj commented 7 years ago

I suppose Gorilla REPL doesn't really claim to make any guarantees about writing your own Vega definitions. I'm not sure if this is over the top (or if anyone really cares enough) but versioning the Vega render data means the ability to invoke the Vega 1.3.3 script for unversioned data and the applicable Vega script for versioned data, perhaps displaying a deprecation warning. Existing code wouldn't be immediately broken.

jonathanj commented 7 years ago

For the record, my primary interest in upgrading Vega (preferably to 3.x) is access to the interactive features (signals and event processing) to achieve effects like zooming and tooltips/labels on hover. A side benefit is that 2.x and 3.x are well documented.

awb99 commented 5 years ago

Hi @jonathanj Has your pull request been merged to the fork of @benfb ?