Skip to content

Conversation

@AntonJames-Sistence
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Previously, edges used to stack on top of each other when there were more than three edges between two nodes.

What is the new behavior?

Now, we can pass an optional aggregateEdges prop to aggregate edges that connect the same pair of nodes in both directions.

Screen.Recording.2025-07-07.at.7.03.10.PM.mov

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@netlify
Copy link

netlify bot commented Jul 7, 2025

Deploy Preview for reagraph ready!

Name Link
🔨 Latest commit 3b5198b
🔍 Latest deploy log https://app.netlify.com/projects/reagraph/deploys/686d3525093d66000882869d
😎 Deploy Preview https://deploy-preview-342--reagraph.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@amcdnl amcdnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like to see if there might be a more optimized way to aggregate the edges using graphology library. If not, all good just want to make sure we think about that.

@amcdnl amcdnl requested a review from qdhenry July 8, 2025 12:17
* @param labelType Label visibility type to determine if edge labels should be visible
* @returns Array of aggregated edges
*/
export const aggregateEdges = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor but do we have any unit test coverage on this?

@amcdnl amcdnl merged commit e37df17 into master Jul 8, 2025
5 checks passed
@amcdnl amcdnl deleted the anton/aggregate-edges branch July 8, 2025 15:56
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 this pull request may close these issues.

4 participants