Skip to content

Commit

Permalink
chore(Canvas): Update @patternfly/react-topology
Browse files Browse the repository at this point in the history
Now that patternfly/react-topology#230 is
completed, we can remove the extended version of the
`DagreGroupsLayout` and use the library directly.

relates: patternfly/react-topology#230
  • Loading branch information
lordrip authored and lhein committed Aug 9, 2024
1 parent 46ff05f commit 4a01067
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 165 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@patternfly/react-core": "5.3.4",
"@patternfly/react-icons": "5.3.2",
"@patternfly/react-table": "5.3.4",
"@patternfly/react-topology": "5.4.0-prerelease.11",
"@patternfly/react-topology": "5.4.0-prerelease.13",
"axios": "1.7.3",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@patternfly/react-core": "5.3.4",
"@patternfly/react-icons": "5.3.2",
"@patternfly/react-table": "5.3.4",
"@patternfly/react-topology": "5.4.0-prerelease.11",
"@patternfly/react-topology": "5.4.0-prerelease.13",
"@types/uuid": "^10.0.0",
"ajv": "^8.12.0",
"ajv-draft-04": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
BreadthFirstLayout,
ColaLayout,
ConcentricLayout,
DagreGroupsLayout,
DefaultEdge,
ForceLayout,
GridLayout,
Expand All @@ -11,7 +12,6 @@ import {
import { createVisualizationNode } from '../../../models/visualization';
import { BaseVisualCamelEntity } from '../../../models/visualization/base-visual-entity';
import { CustomGroupWithSelection } from '../Custom';
import { DagreGroupsExtendedLayout } from '../Custom/Layout/DagreGroupsExtendedLayout';
import { CanvasDefaults } from './canvas.defaults';
import { LayoutType } from './canvas.models';
import { CanvasService } from './canvas.service';
Expand Down Expand Up @@ -81,8 +81,8 @@ describe('CanvasService', () => {
[LayoutType.ColaNoForce, ColaLayout],
[LayoutType.ColaGroups, ColaLayout],
[LayoutType.Concentric, ConcentricLayout],
[LayoutType.DagreVertical, DagreGroupsExtendedLayout],
[LayoutType.DagreHorizontal, DagreGroupsExtendedLayout],
[LayoutType.DagreVertical, DagreGroupsLayout],
[LayoutType.DagreHorizontal, DagreGroupsLayout],
[LayoutType.Force, ForceLayout],
[LayoutType.Grid, GridLayout],
['unknown' as LayoutType, ColaLayout],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ColaLayout,
ComponentFactory,
ConcentricLayout,
DagreGroupsLayout,
DefaultEdge,
EdgeStyle,
ForceLayout,
Expand All @@ -20,7 +21,6 @@ import {
} from '@patternfly/react-topology';
import { IVisualizationNode } from '../../../models/visualization/base-visual-entity';
import { CustomGroupWithSelection, CustomNodeWithSelection, NoBendpointsEdge } from '../Custom';
import { DagreGroupsExtendedLayout } from '../Custom/Layout/DagreGroupsExtendedLayout';
import { CanvasDefaults } from './canvas.defaults';
import { CanvasEdge, CanvasNode, CanvasNodesAndEdges, LayoutType } from './canvas.models';

Expand Down Expand Up @@ -79,15 +79,15 @@ export class CanvasService {
case LayoutType.Concentric:
return new ConcentricLayout(graph);
case LayoutType.DagreVertical:
return new DagreGroupsExtendedLayout(graph, {
return new DagreGroupsLayout(graph, {
rankdir: TOP_TO_BOTTOM,
ranker: 'network-simplex',
nodesep: 20,
edgesep: 20,
ranksep: 0,
});
case LayoutType.DagreHorizontal:
return new DagreGroupsExtendedLayout(graph, {
return new DagreGroupsLayout(graph, {
rankdir: LEFT_TO_RIGHT,
ranker: 'network-simplex',
nodesep: 20,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2607,7 +2607,7 @@ __metadata:
"@patternfly/react-core": 5.3.4
"@patternfly/react-icons": 5.3.2
"@patternfly/react-table": 5.3.4
"@patternfly/react-topology": 5.4.0-prerelease.11
"@patternfly/react-topology": 5.4.0-prerelease.13
"@testing-library/dom": ^10.0.0
"@testing-library/jest-dom": ^6.0.0
"@testing-library/react": ^16.0.0
Expand Down Expand Up @@ -3452,9 +3452,9 @@ __metadata:
languageName: node
linkType: hard

"@patternfly/react-topology@npm:5.4.0-prerelease.11":
version: 5.4.0-prerelease.11
resolution: "@patternfly/react-topology@npm:5.4.0-prerelease.11"
"@patternfly/react-topology@npm:5.4.0-prerelease.13":
version: 5.4.0-prerelease.13
resolution: "@patternfly/react-topology@npm:5.4.0-prerelease.13"
dependencies:
"@dagrejs/dagre": 1.1.2
"@patternfly/react-core": ^5.1.1
Expand All @@ -3474,7 +3474,7 @@ __metadata:
peerDependencies:
react: ^17 || ^18
react-dom: ^17 || ^18
checksum: 491583059094240315155addbc130d1c498e692f293f67d395b9355abf5c6e2b0ab1da904637a37aabcc8ed09aeed84d3ccd2b93de6041cc7349127056c69754
checksum: 96504c170ce170a6f04ff24b5fafffbe7ab74ad24fbffccc52c7ca6e619c2e9ba41541aeaa02d6bf4cd9717713acf5908284b7a52117764c44280b22458466b7
languageName: node
linkType: hard

Expand Down

0 comments on commit 4a01067

Please sign in to comment.