-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from jenny-s51/iss153
feat(pipelines): add support for collapsible groups
- Loading branch information
Showing
19 changed files
with
723 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/demo-app-ts/src/demos/pipelineGroupsDemo/createDemoPipelineGroupsNodes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
packages/demo-app-ts/src/demos/pipelinesDemo/DemoPipelinesGroup.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as React from 'react'; | ||
import { | ||
DefaultTaskGroup, | ||
GraphElement, | ||
LabelPosition, | ||
observer, | ||
ScaleDetailsLevel, | ||
WithContextMenuProps, | ||
WithDragNodeProps, | ||
WithSelectionProps, | ||
} from '@patternfly/react-topology'; | ||
|
||
type DemoPipelinesGroupProps = { | ||
element: GraphElement; | ||
} & WithContextMenuProps & | ||
WithDragNodeProps & | ||
WithSelectionProps; | ||
|
||
const DemoPipelinesGroup: React.FunctionComponent<DemoPipelinesGroupProps> = ({ element }) => { | ||
const data = element.getData(); | ||
const detailsLevel = element.getGraph().getDetailsLevel() | ||
|
||
return ( | ||
<DefaultTaskGroup | ||
element={element} | ||
collapsible={false} | ||
showLabel={detailsLevel === ScaleDetailsLevel.high} | ||
labelPosition={LabelPosition.top} | ||
badge={data?.badge} | ||
/> | ||
); | ||
}; | ||
|
||
export default observer(DemoPipelinesGroup); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.