Closed pjanik closed 4 years ago
Very nice! Initial build, run and test process worked on my up-to-date macOS dev machine. Much easier to do development now.
Have wanted to use lab in a current project and thought I'd need to do a bunch of this myself ... which caused me to delay that part ;-)
I saw a related branch: /171206851-maintenance-d3 updating to d3-v5 that has code not in this branch. Are you planning to continue that work?
Coincidently I've done some work in a branch updating lab-grapher for d3 v5 in the last couple of days. Got stuck in D4 because the built-in D3-zoom system for panning and zooming has been re-architected and I think will need to be worked around. See: concord-consortium/lab-grapher#21
Good to hear that, thanks. :)
I saw a related branch: /171206851-maintenance-d3 updating to d3-v5 that has code not in this branch. Are you planning to continue that work?
Unfortunately, I think we're out of time for more refactoring work. That was all I could squeeze in one week. Frankly speaking, even if there was more time, I think I wouldn't do it after this initial test. I started this branch as I had some problems with the older NPM package. But the most recent 3.x version is modern enough and it works fine both in the web browser and node. So, that's good enough for me (I'm not a big fan of this library :wink:)
The list of breaking changes in v4 is crazy:
https://iros.github.io/d3-v4-whats-new/#1
and I'd say some of them are questionable. It doesn't seem like they cared about backward compatibility with v3 or a nice upgrade process. E.g. .attr({prop: value})
doesn't work and only .attr("prop", value)
is allowed now. It breaks backward compatibility in a pretty silly way and there are multiple changes like that. Maybe there's some logic behind it but it seems pretty opinionated. I think the worst might be changes to transitions that would probably break DNA animations.
It's probably impossible to review this PR in a traditional way. I hope that list of commits might help and I'll try to summarize all the changes here.
src
topublic
. It could be easily replaced by NPM scripts, but I'm running out of time. It's very unlikely developer would need to touch it.lab.js
andlab.css
files.I went ahead and deployed this branch as version 1.17.0-pre.1. I also setup Lab Interactives Site to use this tag as staging, so this build can be demoed and it's ready for QA:
http://lab.concord.org/embeddable-staging.html#interactives/samples/1-oil-and-water-shake.json
If you open JS console, you'll see multiple errors saying that some JS and CSS files haven't been found. That's fine, as these libraries are now bundled in
lab.js
andlab.css
. Once we update production, I'll update Lab Interactive Site(s) not to require these files anymore.I had to update interactives.html/application.js to fix one error: https://github.com/concord-consortium/lab-interactives-site/commit/83e6054da91bdd4475c0cc9c4ae3f4c43b582c25 But I can still see it: http://lab.concord.org/interactives-staging.html#interactives/samples/1-oil-and-water-shake.json I guess it might be a caching issue. Once it gets updated, this page should work fine too.