Skip to content

Commit

Permalink
Merge pull request #2938 from jenny-s51/RHOAIENG-8124
Browse files Browse the repository at this point in the history
[RHOAIENG-8124] Show Pipeline Group Label on Hover at Low Scale
  • Loading branch information
openshift-merge-bot[bot] authored Jun 21, 2024
2 parents 3bd704d + b94f94b commit 15db599
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 50 deletions.
49 changes: 21 additions & 28 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@patternfly/react-styles": "^5.2.1",
"@patternfly/react-table": "^5.2.1",
"@patternfly/react-tokens": "^5.2.1",
"@patternfly/react-topology": "^5.4.0-prerelease.6",
"@patternfly/react-topology": "^5.4.0-prerelease.9",
"@patternfly/react-virtualized-extension": "^5.0.0",
"@types/classnames": "^2.3.1",
"axios": "^1.6.4",
Expand Down
37 changes: 16 additions & 21 deletions frontend/src/concepts/topology/PipelineDefaultTaskGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import {
Node,
GraphElement,
RunStatus,
DEFAULT_LAYER,
Layer,
ScaleDetailsLevel,
TOP_LAYER,
NodeModel,
useHover,
PipelineNodeModel,
Expand Down Expand Up @@ -65,7 +62,7 @@ const DefaultTaskGroupInner: React.FunctionComponent<PipelinesDefaultGroupInnerP
hideDetailsAtMedium
showStatusState
scaleNode={hover && detailsLevel !== ScaleDetailsLevel.high}
showLabel={detailsLevel === ScaleDetailsLevel.high}
showLabelOnHover
status={element.getData()?.runStatus}
hiddenDetailsShownStatuses={[
RunStatus.Succeeded,
Expand All @@ -79,23 +76,21 @@ const DefaultTaskGroupInner: React.FunctionComponent<PipelinesDefaultGroupInnerP
);

return (
<Layer id={detailsLevel !== ScaleDetailsLevel.high && hover ? TOP_LAYER : DEFAULT_LAYER}>
<g ref={hoverRef}>
{element.isCollapsed() ? (
<Popover
triggerRef={popoverRef}
triggerAction="hover"
aria-label="Hoverable popover"
headerContent={element.getLabel()}
bodyContent={getPopoverTasksList(element.getAllNodeChildren())}
>
<g ref={popoverRef}>{groupNode}</g>
</Popover>
) : (
groupNode
)}
</g>
</Layer>
<g ref={hoverRef}>
{element.isCollapsed() ? (
<Popover
triggerRef={popoverRef}
triggerAction="hover"
aria-label="Hoverable popover"
headerContent={element.getLabel()}
bodyContent={getPopoverTasksList(element.getAllNodeChildren())}
>
<g ref={popoverRef}>{groupNode}</g>
</Popover>
) : (
groupNode
)}
</g>
);
},
);
Expand Down

0 comments on commit 15db599

Please sign in to comment.