Skip to content

fix: Advanced Layout Canvas Editing - Special Editing Method will connect the exit of the current node to the exit of subsequent nodes when adding them#3891

Merged
shaohuzhang1 merged 1 commit intov1from
pr@v1@fix_workflow_edge
Aug 20, 2025
Merged

Conversation

@shaohuzhang1
Copy link
Copy Markdown
Contributor

fix: Advanced Layout Canvas Editing - Special Editing Method will connect the exit of the current node to the exit of subsequent nodes when adding them

…nect the exit of the current node to the exit of subsequent nodes when adding them
@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Aug 20, 2025

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Aug 20, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

targetAnchorId: nodeModel.id + '_left'
})

closeNodeMenu()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code has some potential issues that should be addressed:

  1. Unnecessary Console Log: The console.log(nodeModel) statement can clutter the console output and is not necessary for production use. It can be removed.

  2. Consistency in Anchor Handling:

    • In the last line of your snippet, you have commented out a target anchor ID _left. This might unintentionally leave it set to an empty string when constructing the edge. Consider removing the comment to maintain consistency with how anchors are being used elsewhere in the code (e.g., setting left anchor as _left). However, if _left was intended to mean something else, make sure its functionality is properly implemented elsewhere.
  3. Edge Type Consistency: Ensure that type: 'app-edge' remains consistent throughout all edges. If there's a specific reason for using 'app-edge', consider explaining this purpose or providing references where appropriate.

  4. Anchor Position Logic: Double-check the logic around calculating nodeModel.value.x + width / 2 + 200 and anchorData.value.y - item.height. Verify that these values align with expectations and adjust them if needed based on the application’s requirements.

  5. Closing Node Menu: While closeNodeMenu() looks like a legitimate method call, ensure that props indeed includes a nodeModel object which contains a closeNodeMenu method. If closeNodeMenu relies on context beyond just closing the node menu itself, consider passing any required parameters via arguments or changing the approach in clickNodes.

  6. Type Safety: Depending on data types and structures, ensuring type-safety for variables (any) could improve readibility and prevent runtime errors. Using TypeScript annotations would help here.

Overall, focusing on readability and maintaining consistent logic should help address most potential issues without adding overhead unless otherwise stated.

@shaohuzhang1 shaohuzhang1 merged commit cd81992 into v1 Aug 20, 2025
4 of 5 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@v1@fix_workflow_edge branch August 20, 2025 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant