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

Component | Graph: Various improvements #531

Merged
merged 9 commits into from
Feb 18, 2025

Conversation

rokotyan
Copy link
Contributor

This PR accumulates a number of Graph improvements:

New Features

  • Adding a component method to update node positions without re-rendering the full graph
  • Adding an ability to offset the link source and target points (see the video below)
  • Adding label trimming configuration for Panels
  • Adding a config property allowing to specify node dimensions and positions for the ELK layout

Core | Graph Data Model

  • Graph Data Model: Adding a method to set node state by id
  • Graph Data Model: Refactoring
  • Adding data model library exports

Optimizations

  • Optimizing link rendering performance by caching the path lengths

Fixes

  • Providing ELK configuration as a static object was not working
Screen.Recording.2025-02-11.at.3.54.30.PM.mp4

- Add link path length caching to improve rendering performance
- Separate link line and label/flow updates
- Add updateNodePositions method to allow manual node position updates
- Add `labelTrimLength` and `labelTrimMode` options to `GraphPanelConfig` to allow customizing label trimming
- Update `updatePanels` function to use the new label trimming configuration
@lee00678
Copy link
Collaborator

@rokotyan Do we need to add any docs for these?

@rokotyan
Copy link
Contributor Author

@lee00678 I think this two things need to be added to the doc:

  • Component | Graph: Ability to offset link's start and endpoint
  • Component | Graph | Panels: Add label trimming configuration

I wanted to do it but couldn't find time to do it yet

@lee00678
Copy link
Collaborator

@lee00678 I think this two things need to be added to the doc:

  • Component | Graph: Ability to offset link's start and endpoint
  • Component | Graph | Panels: Add label trimming configuration

I wanted to do it but couldn't find time to do it yet

I think it's probably better if we release this with the doc? Or do you want to add the doc later? I don't have bandwidth this week, maybe I can add the doc next week. But we do need to release 1.5.1 this week.

@rokotyan
Copy link
Contributor Author

@lee00678 I would release it without the doc and add it later

@lee00678 lee00678 merged commit 4818a6f into f5:main Feb 18, 2025
4 checks passed
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.

2 participants