From 8b310a464f26f388e562f40d119fcce8c73d51ce Mon Sep 17 00:00:00 2001 From: Kerem Yilmaz Date: Mon, 30 Sep 2024 07:12:01 -0700 Subject: [PATCH] Task form redesign (#888) --- skyvern-frontend/src/api/types.ts | 2 + .../AutoResizingTextarea.tsx | 4 +- .../routes/tasks/create/CreateNewTaskForm.tsx | 665 ++++++++-------- .../tasks/create/CreateNewTaskFormPage.tsx | 3 + .../tasks/create/CreateNewTaskFromPrompt.tsx | 2 + .../src/routes/tasks/create/SavedTaskForm.tsx | 716 ++++++++++-------- .../routes/tasks/create/TaskFormSection.tsx | 65 ++ .../routes/tasks/create/retry/RetryTask.tsx | 2 + 8 files changed, 832 insertions(+), 627 deletions(-) create mode 100644 skyvern-frontend/src/routes/tasks/create/TaskFormSection.tsx diff --git a/skyvern-frontend/src/api/types.ts b/skyvern-frontend/src/api/types.ts index 841a7143..3fcd53b0 100644 --- a/skyvern-frontend/src/api/types.ts +++ b/skyvern-frontend/src/api/types.ts @@ -77,6 +77,8 @@ export type TaskApiResponse = { error_code_mapping: null; proxy_location: string; extracted_information_schema: string | object; + totp_verification_url: string | null; + totp_identifier: string | null; }; task_id: string; status: Status; diff --git a/skyvern-frontend/src/components/AutoResizingTextarea/AutoResizingTextarea.tsx b/skyvern-frontend/src/components/AutoResizingTextarea/AutoResizingTextarea.tsx index 4fb06ecc..a252ef07 100644 --- a/skyvern-frontend/src/components/AutoResizingTextarea/AutoResizingTextarea.tsx +++ b/skyvern-frontend/src/components/AutoResizingTextarea/AutoResizingTextarea.tsx @@ -2,7 +2,7 @@ import { useLayoutEffect, useRef } from "react"; import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/util/utils"; -type Props = React.ComponentProps; +type Props = React.ComponentPropsWithoutRef; function AutoResizingTextarea(props: Props) { const ref = useRef(null); @@ -26,9 +26,9 @@ function AutoResizingTextarea(props: Props) { return (