Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deletable nodes #801

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Deletable nodes #801

merged 2 commits into from
Sep 10, 2024

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Sep 10, 2024

🚀 This description was created by Ellipsis for commit 18ecf72

Summary:

This PR introduces deletable nodes in the workflow editor, updating components and adding a new dependency for unique ID generation.

Key points:

  • Introduces deletable nodes in the workflow editor.
  • Adds deleteNode function in FlowRenderer.
  • Adds DeleteNodeCallbackContext in skyvern-frontend/src/store/DeleteNodeCallbackContext.ts.
  • Creates useDeleteNodeCallback hook in skyvern-frontend/src/routes/workflows/hooks/useDeleteNodeCallback.ts.
  • Updates node components (e.g., CodeBlockNode, DownloadNode) to use NodeActionMenu and useDeleteNodeCallback.
  • Adds NodeActionMenu component in skyvern-frontend/src/routes/workflows/editor/nodes/NodeActionMenu.tsx.
  • Enhances workflowEditorUtils with generateNodeLabel function.
  • Adds nanoid dependency for unique ID generation.

Generated with ❤️ by ellipsis.dev

…src/'

<!-- ELLIPSIS_HIDDEN -->

| 🚀 | This description was created by [Ellipsis](https://www.ellipsis.dev) for commit e2ea77b37bbe5ae346723ab5cd00377f746d5423  |
|--------|--------|

### Summary:
This PR introduces deletable nodes in the workflow editor, adding a delete node callback context, updating node components, and enhancing utility functions.

**Key points**:
- Introduces deletable nodes in the workflow editor.
- Adds delete node callback context.
- Updates node components for deletion.
- Enhances utility functions for node management.
- Adds `nanoid` dependency for unique ID generation.
- Provides `DeleteNodeCallbackContext` for managing node deletion callbacks.
- Creates `useDeleteNodeCallback` hook.
- Updates `FlowRenderer` for node deletion logic.
- Adds `NodeActionMenu` component for node actions.
- Modifies node components to use `NodeActionMenu` and `useDeleteNodeCallback`.
- Enhances `workflowEditorUtils` with `generateNodeLabel` function.

----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)

<!-- ELLIPSIS_HIDDEN -->
@ykeremy ykeremy added the sync label Sep 10, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 7279f1f in 30 seconds

More details
  • Looked at 911 lines of code in 13 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_sO05oC2ZfsSmrECO


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

return [];
}
if (edge.target === id) {
const nextEdge = edges.find((edge) => edge.source === id);
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic for finding the next edge to connect when deleting a node is incorrect. It should find the edge where the source is the current node's target, not the current node's source. Consider revising this logic.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 7279f1f in 31 seconds

More details
  • Looked at 912 lines of code in 13 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_fc6koUaTe6mOWtU8


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 18ecf72 in 21 seconds

More details
  • Looked at 12 lines of code in 1 files
  • Skipped 1 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern-frontend/package.json:50
  • Draft comment:
    Ensure that the 'nanoid' version '^5.0.7' is compatible with the rest of the dependencies and the project requirements.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The addition of the 'nanoid' dependency is correctly reflected in the package.json file. However, it's important to ensure that the version added is compatible with the rest of the dependencies and the project requirements.

Workflow ID: wflow_YuLjlbiJ3K2ukvkr


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@msalihaltun msalihaltun merged commit 0053736 into main Sep 10, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/workflow-delete-nodes branch September 10, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants