berkmancenter / dotplot

Telling a story through dots
GNU General Public License v3.0
51 stars 27 forks source link

DRY up the codebase and make smaller functions #86

Closed jdcc closed 7 years ago

jdcc commented 7 years ago

There's a lot of duplication in the code base (specifically in controllers/create.js). Break out common pieces of code into functions, and make sure each function only does one specific thing. There's a ton to read about this kind of stuff, but here's a quick primer.

jdcc commented 7 years ago

But wait on this until I merge in the d3v4 changes.

chaitanyya commented 7 years ago

Moving all calculations to utils.

chaitanyya commented 7 years ago

Done for the majority of the create.js code, working on getNodes() function and project.js now.

chaitanyya commented 7 years ago

Updated getNodes() working on project.js now.

chaitanyya commented 7 years ago

@jdcc would like your feedback on the code-restructure. Please let me know if I'm following the best practices.

jdcc commented 7 years ago

I've done a big ol' refactor on the dev branch. @chaitanyya, take a look. It's not clean yet, but the code base is much simpler now.