Skip to content

Commit

Permalink
Don't collapse groups in pipeline layout demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-phillips-18 authored and jenny-s51 committed Mar 25, 2024
1 parent 6ddbbac commit a84bd4d
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react';
import {
DefaultTaskGroup,
EdgeCreationTypes,
GraphElement,
LabelPosition,
observer,
Expand All @@ -10,34 +9,24 @@ import {
WithDragNodeProps,
WithSelectionProps,
} from '@patternfly/react-topology';
import { GROUPED_EDGE_TYPE } from './pipelineComponentFactory';

type DemoPipelinesGroupProps = {
element: GraphElement;
} & WithContextMenuProps &
WithDragNodeProps &
WithSelectionProps;

const getEdgeCreationTypes = (): EdgeCreationTypes => ({
edgeType: GROUPED_EDGE_TYPE,
spacerEdgeType: GROUPED_EDGE_TYPE,
finallyEdgeType: GROUPED_EDGE_TYPE,
});

const DemoPipelinesGroup: React.FunctionComponent<DemoPipelinesGroupProps> = ({ element }) => {
const data = element.getData();
const detailsLevel = element.getGraph().getDetailsLevel()

return (
<DefaultTaskGroup
element={element}
collapsible
collapsedWidth={75}
collapsedHeight={75}
collapsible={false}
showLabel={detailsLevel === ScaleDetailsLevel.high}
labelPosition={LabelPosition.top}
badge={data?.badge}
getEdgeCreationTypes={getEdgeCreationTypes}
/>
);
};
Expand Down

0 comments on commit a84bd4d

Please sign in to comment.