Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ændrew Rininsland
    @aendrew
    Hi folks — I've created this room to help collaborate on C3 v1, which is probably something we should start moving on given D3 v4 is now out and there is a ton of awesome stuff we can start doing.
    Ændrew Rininsland
    @aendrew
    I’m going through this PR and I think we should seriously consider using it as the basis for v1: c3js/c3#1765
    I’ve started doing similar work in aendrew/c3#webpackify but it’s really just been a straight-forward “break everything into modules and import them”. The PR above is smarter, already uses Rollup, and passes most tests.
    Ændrew Rininsland
    @aendrew
    Using the new GitHub projects system, I’ve created a new project at https://github.com/c3js/c3/projects/1
    Ændrew Rininsland
    @aendrew
    I’ve pushed #1765 to a new branch, v1-dev, and moved the Rollup config out of the Gruntfile. I also added rollup-plugin-babel so we can start using ES6+, which will help quite a lot with code readability and quality.
    Ændrew Rininsland
    @aendrew
    Good news everyone — I’m about half-way done rewriting all of the concatenated modules into actual ES6 modules. See 4e32e7e1bd059310da097d9bf1956bd81c06cc63 and fc80f11907fd59a0610d7bea6b5f132ff987a270
    Noah Nordrum
    @nnordrum
    Wouldn't it make more sense to call it C3v4? Since it's supporting d3v4...
    Ændrew Rininsland
    @aendrew
    @nnordrum Not really; the version of D3 being used is an implementation detail that should ultimately be opaque to the user. Plus it makes semver a bit more confusing, and v1 is all about the modularization/plugin infrastructure/everything else than merely the D3 upgrade.
    Michael Rodov
    @michaelrodov
    is there a lot of work rewriting to es6? or your done with it
    Ændrew Rininsland
    @aendrew
    @michaelrodov I’m mostly done it; if you check out the v1-dev branch, it’s mostly in ES6. The next step will be to gradually rewrite the lib, removing various disabled rules from .eslintrc.
    The biggest issue right now is the tests.
    I’m not going to mince words. The tests are garbage right now.
    I had no idea they were this bad until I started really looking at them.
    Currently I’m trying to convert everything to just use Mocha and run on the server instead of Karma + Jasmine in the browser.
    Alas, C3 is really not meant for the server at this point, it leverages window a lot.
    So the first step is changing its eventing model so it doesn’t require a window object to work. I’m not sure what the best approach is; perhaps set a var at the top level like const window = window || global || {};
    The upshot of fixing this is that suddenly C3 will work on the server, and unit tests will be much more reliable.
    We’ll also have a far better idea of what our test coverage is actually like, and be able to work to increase coverage.
    I feel a huge part of why we perpetually have so many regressive bugs is we really only have like 35-40% test coverage.
    The expect(true).toBeTruthy() nonsense I mentioned in the other channel gave us a really false sense of security, it inflated test coverage to above 65%.
    Ændrew Rininsland
    @aendrew
    This message was deleted