From b043a4f9ca26209902a21ef2e2b0fc11e2c60c92 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Fri, 29 Nov 2024 06:26:54 -0800 Subject: [PATCH] Change block order in node library (#1293) --- .../panels/WorkflowNodeLibraryPanel.tsx | 87 +++++++++---------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/skyvern-frontend/src/routes/workflows/editor/panels/WorkflowNodeLibraryPanel.tsx b/skyvern-frontend/src/routes/workflows/editor/panels/WorkflowNodeLibraryPanel.tsx index 81ce6ca9..abf7dea0 100644 --- a/skyvern-frontend/src/routes/workflows/editor/panels/WorkflowNodeLibraryPanel.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/panels/WorkflowNodeLibraryPanel.tsx @@ -6,12 +6,10 @@ import { DownloadIcon, EnvelopeClosedIcon, FileIcon, - ListBulletIcon, LockOpen1Icon, PlusIcon, StopwatchIcon, UpdateIcon, - UploadIcon, } from "@radix-ui/react-icons"; import { WorkflowBlockNode } from "../nodes"; import { AddNodeProps } from "../FlowRenderer"; @@ -27,16 +25,28 @@ const nodeLibraryItems: Array<{ description: string; }> = [ { - nodeType: "task", - icon: , - title: "Task Block", - description: "Takes actions or extracts information", + nodeType: "navigation", + icon: , + title: "Navigation Block", + description: "Navigate on the page", }, { - nodeType: "loop", - icon: , - title: "For Loop Block", - description: "Repeats nested elements", + nodeType: "action", + icon: , + title: "Action Block", + description: "Take a single action", + }, + { + nodeType: "extraction", + icon: , + title: "Extraction Block", + description: "Extract data from the page", + }, + { + nodeType: "validation", + icon: , + title: "Validation Block", + description: "Validate the state of the workflow or terminate", }, { nodeType: "textPrompt", @@ -50,6 +60,19 @@ const nodeLibraryItems: Array<{ title: "Send Email Block", description: "Sends an email", }, + // legacy + // { + // nodeType: "task", + // icon: , + // title: "Task Block", + // description: "Takes actions or extracts information", + // }, + { + nodeType: "loop", + icon: , + title: "For Loop Block", + description: "Repeats nested elements", + }, // temporarily removed // { // nodeType: "codeBlock", @@ -70,35 +93,17 @@ const nodeLibraryItems: Array<{ // title: "Download Block", // description: "Downloads a file from S3", // }, + // { + // nodeType: "upload", + // icon: , + // title: "Upload Block", + // description: "Uploads a file to S3", + // }, { - nodeType: "upload", - icon: , - title: "Upload Block", - description: "Uploads a file to S3", - }, - { - nodeType: "validation", - icon: , - title: "Validation Block", - description: "Validate the state of the workflow or terminate", - }, - { - nodeType: "action", - icon: , - title: "Action Block", - description: "Take a single action", - }, - { - nodeType: "navigation", - icon: , - title: "Navigation Block", - description: "Navigate on the page", - }, - { - nodeType: "extraction", - icon: , - title: "Extraction Block", - description: "Extract data from the page", + nodeType: "fileDownload", + icon: , + title: "File Download Block", + description: "Download a file", }, { nodeType: "login", @@ -112,12 +117,6 @@ const nodeLibraryItems: Array<{ title: "Wait Block", description: "Wait for some time", }, - { - nodeType: "fileDownload", - icon: , - title: "File Download Block", - description: "Download a file", - }, ]; type Props = {