From 415e5ffd000704b8abca150c7a8c041797c1bda9 Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Thu, 12 Jun 2025 02:46:54 +0000
Subject: [PATCH] Refactor: Replace skeleton loading with spinner overlay
I've replaced the skeleton loading UI with a centered spinner icon overlay on the following pages:
- Tables list
- Datasets list
- Models/Providers management
- Workflows list
This change aims to prevent the "flash" effect that could occur when data loads quickly, providing a smoother loading experience.
The implementation involves:
- Adding a reusable `IconSpinner` component.
- Modifying the respective page/list components to use this spinner during their loading state.
- Ensuring the spinner is centered and overlays the content area.
Build checks, type checks, and unit tests in the ui/ directory pass with these changes.
---
ui/src/components/dataset-list-page.tsx | 41 +++------
ui/src/components/models/model-manager.tsx | 88 ++++--------------
ui/src/components/table-list-page.tsx | 69 ++++++--------
ui/src/components/ui/icons.tsx | 22 ++++-
ui/src/components/workflow-list-page.tsx | 101 +++++++++------------
5 files changed, 124 insertions(+), 197 deletions(-)
diff --git a/ui/src/components/dataset-list-page.tsx b/ui/src/components/dataset-list-page.tsx
index 3ec5b335..88c393a8 100644
--- a/ui/src/components/dataset-list-page.tsx
+++ b/ui/src/components/dataset-list-page.tsx
@@ -6,14 +6,8 @@ import {
updateDataset,
} from "@/actions";
import { Button } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardFooter,
- CardHeader,
-} from "@/components/ui/card";
import { CommonCard } from "@/components/ui/common-card";
-import { Skeleton } from "@/components/ui/skeleton";
+import { IconSpinner } from "@/components/ui/icons";
import { toast } from "@/hooks/use-toast"; // Import toast
import { PlusIcon, QuestionMarkCircledIcon } from "@radix-ui/react-icons";
import { useCallback, useEffect, useState } from "react";
@@ -214,27 +208,18 @@ function DatasetList({
}, [fetchDatasetsInternal, refreshKey]);
return (
-