-
Notifications
You must be signed in to change notification settings - Fork 10
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
Upgrade to d3v4 #9
base: master
Are you sure you want to change the base?
Conversation
👍 |
Thanks @gka - we're waiting on @herrstucki to merge this in! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is terrific. I haven't had time to test it yet, but from reading the source, it all looks good.
One thing though: you'll need to add a build step for consumers which can't import ES modules directly. See https://github.com/d3/d3-selection/blob/master/package.json#L26 for example. Also make sure that the respective module types are referenced properly in package.json
, e.g. https://github.com/d3/d3-selection/blob/master/package.json#L18-L20
package.json
Outdated
"main": "d3-grid.js", | ||
"scripts": { | ||
"test": "node_modules/.bin/vows --spec" | ||
}, | ||
"repository": "https://github.com/interactivethings/d3-grid.git", | ||
"repository": "https://github.com/basilesimon/d3-grid.git", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@herrstucki done 👍
@basilesimon not sure if you're still working on it but the P.S.: I fixed |
@herrstucki Ah, this is about as far as I'm going to go. Some tests are still soft-failing (not being return what's expected)... I'd really welcome your help on these at this point. The build and packaging have been fixed and now working nicely 💯 😀 |
How's this looking guys? Hit a stumbling block on an v3 to v4 upgrade with this handy dependency! |
@oller The code in this PR is in use in production on my side. I just can't quite get it to pass the tests, hence the PR being still open... |
Ah great, I'll give it a whirl. Thanks for the prompt response @basilesimon! 👍 |
How are you importing and referencing this lib now @basilesimon, as d3 v4 has done away with I can see the plugin present in node_modules with the PR code. I've tried both...
Both return undefined, the only way I can get some sense back is:
I've tried using both yarn and npm to install this PR in their respective formats. I'm on webpack 3.4 Any insights appreciated. |
@oller that takes a bit of fiddling. See this folder for example: I've adapted |
Hey @herrstucki, sorry to bother you again, but I think I need some help to get this over the line. It would be fantastic to have this plugin properly available. At the moment this is something I personally use all the time, but the implementation described in my above comment is pretty gross. Also, we now have this fork with a confusing name (cc @finnfiddle). Maybe it would be simpler if we had one, up-to-date version of this plugin we can all contribute to? |
This pull request upgrade
d3-grid
code to d3v4.This is still a work in progress and should not be merged yet
Goals
Upgrade to d3v4 : e2714ad
x = d3.scale.ordinal(),
becomesx = d3.scaleOrdinal(),
x.domain(d3.range(_cols)).rangeBands
becomex.domain(d3.range(_cols)).rangePoints
becomesTrim down the dependencies to modular d3: 838c964
The plugin now only loads
d3-scale
, instead of the whole ofd3
.Adopt d3v4 plugin structure: f3015dd
d3-grid.js
has been moved to asrc/
directory. See guidance on publishing a d3 plugin