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

feat(Canvas): Extend DagreGroupsLayout #1299

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

lordrip
Copy link
Member

@lordrip lordrip commented Aug 8, 2024

Context

Currently, DagreLayout is used to render the graph, and while it does work, it doesn't support nested groups properly due to a limitation in Dagre itself.

In the @patternfly/react-topology there's another layout called DagreGroupsLayout that performs individual layout inside each group, providing a better result when the graph contains nested groups.

This commit brings that class over and uses the initial node index for sorting the graph node, this way the order is kept when expanding/collapsing nodes in the Canvas.

fix: #368
related: patternfly/react-topology#230

Currently, `DagreLayout` is used to render the graph, and while it does
work, it doesn't support nested groups properly due to a limitation in
Dagre itself.

In the `@patternfly/react-topology` there's another layout called `DagreGroupsLayout` that performs individual layout inside each group, providing a better result when the graph contains nested groups.

This commit brings that class over and uses the initial node index for
sorting the graph node, this way the order is kept when expanding/collapsing nodes in the Canvas.

Related issue: patternfly/react-topology#230
@lordrip lordrip merged commit 5d07c35 into KaotoIO:main Aug 8, 2024
9 checks passed
@lordrip lordrip deleted the feat/extend-dagregroups-layout branch August 8, 2024 13:16
@lordrip lordrip changed the title feate(Canvas): Extend DagreGroupsLayout feat(Canvas): Extend DagreGroupsLayout Oct 4, 2024
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.

Introduce containers in the canvas for branches
1 participant