From 550ad65c5d306df875654ed19043b0fb7dc97a4e Mon Sep 17 00:00:00 2001 From: Kerem Yilmaz Date: Tue, 23 Apr 2024 13:54:04 -0700 Subject: [PATCH] UI/UX improvements (#218) --- skyvern-frontend/src/components/ui/card.tsx | 6 +- .../src/routes/settings/Settings.tsx | 71 ++++--- .../src/routes/tasks/detail/TaskDetails.tsx | 112 +++++----- .../src/routes/tasks/list/TaskList.tsx | 192 ++++++++++-------- .../routes/tasks/list/TaskListSkeleton.tsx | 8 +- .../src/routes/tasks/running/QueuedTasks.tsx | 4 + 6 files changed, 220 insertions(+), 173 deletions(-) diff --git a/skyvern-frontend/src/components/ui/card.tsx b/skyvern-frontend/src/components/ui/card.tsx index 84a3b50b6..13793cd7b 100644 --- a/skyvern-frontend/src/components/ui/card.tsx +++ b/skyvern-frontend/src/components/ui/card.tsx @@ -23,7 +23,7 @@ const CardHeader = React.forwardRef< >(({ className, ...props }, ref) => (
)); @@ -57,7 +57,7 @@ const CardContent = React.forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( -
+
)); CardContent.displayName = "CardContent"; @@ -67,7 +67,7 @@ const CardFooter = React.forwardRef< >(({ className, ...props }, ref) => (
)); diff --git a/skyvern-frontend/src/routes/settings/Settings.tsx b/skyvern-frontend/src/routes/settings/Settings.tsx index 1248f7c63..f3ea047c2 100644 --- a/skyvern-frontend/src/routes/settings/Settings.tsx +++ b/skyvern-frontend/src/routes/settings/Settings.tsx @@ -1,5 +1,4 @@ import { Label } from "@/components/ui/label"; -import { useId } from "react"; import { Select, SelectContent, @@ -8,40 +7,54 @@ import { SelectValue, } from "@/components/ui/select"; import { useSettingsStore } from "@/store/SettingsStore"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; function Settings() { const { environment, organization, setEnvironment, setOrganization } = useSettingsStore(); - const environmentInputId = useId(); - const organizationInputId = useId(); return ( -
-

Settings

-
- -
- -
- -
- -
-
+
+ + + Settings + + You can select environment and organization here + + + +
+
+ + +
+
+ + +
+
+
+
); } diff --git a/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx b/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx index feb57f6cf..6f9d5d4cb 100644 --- a/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx +++ b/skyvern-frontend/src/routes/tasks/detail/TaskDetails.tsx @@ -18,6 +18,7 @@ import { StepArtifactsLayout } from "./StepArtifactsLayout"; import Zoom from "react-medium-image-zoom"; import { AspectRatio } from "@/components/ui/aspect-ratio"; import { getRecordingURL, getScreenshotURL } from "./artifactUtils"; +import { Skeleton } from "@/components/ui/skeleton"; function TaskDetails() { const { taskId } = useParams(); @@ -39,14 +40,6 @@ function TaskDetails() { return
Error: {taskError?.message}
; } - if (isTaskFetching) { - return
Loading...
; // TODO: skeleton - } - - if (!task) { - return
Task not found
; - } - return (
@@ -58,9 +51,9 @@ function TaskDetails() { refetch(); }} > - + - {task.recording_url ? ( + {task?.recording_url ? (