IlIllII / collecobrary

Making online learning fun and easy.
https://shapesofknowledge.io
MIT License
101 stars 5 forks source link

Refactor d3 digraph code #7

Open IlIllII opened 3 years ago

IlIllII commented 3 years ago

Right now the d3 digraph code is embedded in the DegreeMap.vue component.

It is not very clean and I think it would be better if we refactor the code to be a separate script.

This would help in case we want to use the digraph in another place.

IlIllII commented 2 years ago

With the addition of the sidebar, I think we should extract the color map from the degree-map so it is easier to pass as a prop to both the sidebar and digraph instead of emitting the data up the component hierarchy and back down whenever we want to make a lateral transfer.

We should also pull out data parsing into its own module because this interface might change as we change how we store our course data.