dc-js/dc.js

Preparing for dc-v5 release - decision points

kum-deepak opened this issue · 8 comments

@gordonwoodhull, I was going through open issues marked for dc-v5. It seems we can close quite a lot of those - which are small work each. However, at this stage, it will good to have some decisions that will impact some of those.

I have started work on updating examples, the docs, and the migration guide. These I have hosted at https://kum-deepak.github.io/dc.js/, https://kum-deepak.github.io/dc.js/html2/, and https://kum-deepak.github.io/dc.js/html2/pages/Guides/dc-v5-upgrade-guide.html. Please go through the migration guide, it will give an idea of stuff that is removed or is getting moved to the compat layer.

Decision points (some of these we have discussed already):

  • The library has been written in a way to facilitate releasing with and without the compat layer. We will need to decide which one we call the dc@5, what we call the other?
  • Alternatively, I have not tried, however, it should be possible to split into dc@5 and dc-4-compat. Users needing the compat version will need to make two includes.
  • Do we need to bring anything back from compat into the main release? This will become clearer once we start moving examples to the newer syntax.
  • #1734 - I am not hopeful that many will work with the new release. It should not be difficult to migrate these. I can port the most important ones.
  • Remoting capabilities (#1801) - There is a small set of classes and server samples. Server samples would definitely be distributed as samples as a separate repo. The client additional code may be distributed as separate UMD and ES6 modules inside or outside the main repo. We will need to make consideration for documentation accordingly,
  • Should we support only d3@6 with dc-v5. This will hardly impact users who are using dc standalone, however, will allow cleaner library code?

It's great to see everything documented. I took a quick read but it will take me some time to digest it and make suggestions.

We should release this soon. We already have a backlog of fixes and examples in dc@4 which need to be ported to dc@5. I don't think we can stop fixing bugs on dc@4 immediately, but we can stop some duplication of effort. The sooner we release dc@5 the sooner we can let go of dc@4.

As for releases, you are talking about the npm release names?

Both npm release names and script names for UMD. Technically we can keep both names to be dc.js, however, for easier support, we should name both differently (like dc.js & dc-neo.js or dc-comapt.js & dc/js).

I also added one more question regarding whether to support only d3@v6 with dc-v5 (see the edited version above).

In general the migration guide should focus on how to port code from the old version to the new version, with rationale as a side point.

For example:

  • what are the new APIs people should look at if they previously relied on addFilterHandler etc to implement custom selection behavior?
  • say how to use new chart group, then talk about the benefits in a separate paragraph

As for naming, I see, it's not two npm releases it's just different artifact names inside the release. I would lean toward dc.js as pure dc@5, dc-compat.js as dc.js with compatibility layer. I don't see any benefit to separating them, do you?

I lean toward dropping d3@5 compatibility, but I'm not 100% sure yet, let's discuss. This mainly affects people who are using other libraries or straight D3 code in their page which have not been updated, and there are workarounds (e.g. add a d3v5 global).

Looks like the rest of the points are to-do or tbd.

Thanks @gordonwoodhull, this covers all immediate decisions.

I personally think we should drop d3@5 compatibility. I will proceed accordingly.

I am back after a long gap. I hope you also have some time for reviews now.

For a start, I will merge the current version of the migration guide. It is incomplete, however, will come back to that.

Hi @kum-deepak! Nice to see you back.

I have been thinking that it would be nice to merge v5 and keep things moving along. Looking forward to reviewing this and helping merge the stuff from develop.

I’m on vacation through next week, but let’s connect after the 14th!

All of these have been resolved.