VEuPathDB / web-monorepo

A monorepo that contains all frontend code for VEuPathDB websites
Apache License 2.0
2 stars 0 forks source link

Consolidate network components into one #996

Closed asizemore closed 4 months ago

asizemore commented 5 months ago

Dependency of #924 and #1038

Currently our frontend separates the idea of a regular network (think hairball type) from a bipartite or other network. This is not ideal. It would be more helpful to have a single Network component that could handle all the cases.

A little background:

Network would be very similar to BipartiteNetwork but would be more general. For starters,

The data prop should be "exploded" to be the props nodes, links, and partitions, the last being optional The type of the partitions prop should be { name?: string, nodeList: string[]; } If partitions is empty, then a simple graph will be rendered

( from Dave in slack)

Network should have a default layout if node x and y values are not provided. For the case where the graph is partitioned, the default layout would be nodes aligned in columns according to their partitions. For the case of no partitions, the default should be a ring.

asizemore commented 5 months ago

Assigning myself. If push comes to shove, someone else can totally take it! But this is somehting i'm really interested in