Graphical Selector Spike Findings
Choice of library
So, there were a few choices to choose from:
React-flow-renderer
this has the benefit of having straight react components, so its less buggy
However, this requires positions to be known in advance, which i wanted to avoid at all costs (this has to be hard coded)
antv
natural option since its also a dependancy of antd
this has lots of cool features built in
no need to hard-code pos
the main issue is code ugliness - bashing this non-react library into react requires a hairy mess of code.
Its main maintainers are not english speakers - this is not a problem intrinsically, but their english documentation isnt great because of this.
https://github.com/plotly/react-cytoscapejs
didnt particularly like it from the onset since the last push was a year old
avoided it since there didnt seem to be the features i wanted
JS library, no React support - will need to manipulate DOM as well
Very customisable but steep learning curve API is MASSIVE af - very verbose in making data vis
Lots of different representation options
Graphical selector: https://observablehq.com/@d3/force-directed-graph
Prereq tree: https://observablehq.com/@d3/collapsible-tree
Most popular and maintained
https://airbnb.io/visx/gallery
Built for React - React components with props
Low-level standalone packages so less dependencies
Not many features and will have to build on top of the components
Relatively new and maintained by Airbnb so support should be g
Tree looks g but network seems like not too much built-in functionality
Let an FE person have a look and see if i made the right decisions, and feel free to mess with this. The initial FE code https://github.com/csesoc/Circles/pull/493 is by no means complex or even good. Feel free to dump in favour of something else.
Where to next
There are quite a few features that should be built upon here including:
giving more data to the user as they traverse
allowing selection of courses from the graphical selector
options of hiding courses (basic CS has like 90 nodes already, which is hard to fit on a screen)
There is also a more fundamental issue - i havent played around with antv enough to know if the features are good enough to make good enough graphs dynamically. The auto-generated ones at the moment are correct, but not good. This should be looked more into.