Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate network components into one #996

Closed
asizemore opened this issue Apr 11, 2024 · 1 comment · Fixed by #1052
Closed

Consolidate network components into one #996

asizemore opened this issue Apr 11, 2024 · 1 comment · Fixed by #1052
Assignees

Comments

@asizemore
Copy link
Member

asizemore commented Apr 11, 2024

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:

  • Originally we started abstracting away from a Network component becuase it seemed like it would end up just being visx's Graph component.
  • We're realizing now that our component would differ a bit from the visx Graph. It would have default layouts and node interactions.
  • We're realizing we want all of our networks across the site to look and feel the same. That goal will be much more easily managed if we have only one Network component.

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
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant