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

Remove whitespace when blocks are renamed #884

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Sep 25, 2024

Important

Improves node label handling by replacing whitespace with underscores and ensuring uniqueness across multiple node types in the workflow editor.

  • Behavior:
    • Replaces whitespace with underscores in node labels in CodeBlockNode.tsx, DownloadNode.tsx, and 6 other node files.
    • Ensures unique labels using getUniqueLabelForExistingNode() in workflowEditorUtils.ts.
  • Functions:
    • Renames getLabelForExistingNode() to getUniqueLabelForExistingNode() in workflowEditorUtils.ts.
    • Updates getUniqueLabelForExistingNode() to append underscores instead of parentheses for duplicate labels.
  • Constants:
    • Changes NEW_NODE_LABEL_PREFIX from "Block " to "block_" in workflowEditorUtils.ts.

This description was created by Ellipsis for 1163cf1. It will automatically update as commits are pushed.

…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Improves node label handling by removing whitespace and ensuring uniqueness across multiple node types in the workflow editor.
>
>   - **Behavior**:
>     - Replaces whitespace with underscores in node labels in `CodeBlockNode.tsx`, `DownloadNode.tsx`, and 6 other node files.
>     - Ensures unique labels using `getUniqueLabelForExistingNode()` in `workflowEditorUtils.ts`.
>   - **Functions**:
>     - Renames `getLabelForExistingNode()` to `getUniqueLabelForExistingNode()` in `workflowEditorUtils.ts`.
>     - Updates `getUniqueLabelForExistingNode()` to append underscores instead of parentheses for duplicate labels.
>   - **Constants**:
>     - Changes `NEW_NODE_LABEL_PREFIX` from `"Block "` to `"block_"` in `workflowEditorUtils.ts`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for 90514d0a30ad9081df0f97722c84d933cefe8911. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
@ykeremy ykeremy added the sync label Sep 25, 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.

👍 Looks good to me! Reviewed everything up to 1163cf1 in 11 seconds

More details
  • Looked at 248 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:757
  • Draft comment:
    The function getUniqueLabelForExistingNode now appends underscores instead of using parentheses for duplicate labels. Ensure this change is consistent with the rest of the application logic.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function getUniqueLabelForExistingNode is used in multiple files to ensure unique labels. However, the logic for appending underscores to create unique labels is not consistent with the previous logic of using parentheses. This change should be highlighted for consistency and clarity.

Workflow ID: wflow_CBVqcOlMivjOXuwe


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 1163cf1 in 13 seconds

More details
  • Looked at 248 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern-frontend/src/routes/workflows/editor/workflowEditorUtils.ts:764
  • Draft comment:
    The loop condition should be i <= existingLabels.length + 1 to ensure all possible numbers are checked for uniqueness.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_u9hl4gci5zXV6OvA


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

@msalihaltun msalihaltun merged commit 9f98fc9 into main Sep 25, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/dont-allow-space-in-block-title branch September 25, 2024 14:50
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