@@ -46,7 +46,7 @@ import {
46
46
ChangeCIPayloadType ,
47
47
CIPipelineNodeType ,
48
48
URLS as CommonURLS ,
49
- AppConfigProps
49
+ AppConfigProps ,
50
50
} from '@devtron-labs/devtron-fe-common-lib'
51
51
import { ReactComponent as ICInput } from '../../assets/icons/ic-input.svg'
52
52
import { ReactComponent as ICMoreOption } from '../../assets/icons/ic-more-option.svg'
@@ -64,7 +64,8 @@ const getParsedPluginPolicyConsequenceData = importComponentFromFELibrary(
64
64
)
65
65
66
66
export interface WorkflowProps
67
- extends RouteComponentProps < { appId : string ; workflowId ?: string ; ciPipelineId ?: string ; cdPipelineId ?: string } > , Required < Pick < AppConfigProps , 'isTemplateView' > > {
67
+ extends RouteComponentProps < { appId : string ; workflowId ?: string ; ciPipelineId ?: string ; cdPipelineId ?: string } > ,
68
+ Required < Pick < AppConfigProps , 'isTemplateView' > > {
68
69
nodes : CommonNodeAttr [ ]
69
70
id : number
70
71
name : string
@@ -535,7 +536,6 @@ export class Workflow extends Component<WorkflowProps, WorkflowState> {
535
536
)
536
537
}
537
538
538
-
539
539
getEdges ( { nodesWithBufferHeight } : { nodesWithBufferHeight : CommonNodeAttr [ ] } ) {
540
540
return nodesWithBufferHeight . reduce ( ( edgeList , node ) => {
541
541
node . downstreams . forEach ( ( downStreamNodeId ) => {
@@ -683,7 +683,11 @@ export class Workflow extends Component<WorkflowProps, WorkflowState> {
683
683
)
684
684
}
685
685
}
686
- return edgeList
686
+
687
+ // In the SVG, the bottom elements are rendered on top.
688
+ // By reversing, this prevents the path elements (workflow arrows) from overlapping and covering other elements
689
+ // like the ApprovalNode button or add node button, which are rendered earlier.
690
+ return edgeList . reverse ( )
687
691
}
688
692
689
693
toggleShowDeleteDialog = ( ) => {
@@ -787,7 +791,9 @@ export class Workflow extends Component<WorkflowProps, WorkflowState> {
787
791
788
792
return (
789
793
< ConditionalWrap
790
- condition = { ! this . props . isOffendingPipelineView && ! this . props . isTemplateView && this . props . showWebhookTippy }
794
+ condition = {
795
+ ! this . props . isOffendingPipelineView && ! this . props . isTemplateView && this . props . showWebhookTippy
796
+ }
791
797
wrap = { ( children ) => (
792
798
< Tippy
793
799
placement = "top-start"
0 commit comments