From ac87f3fde08dfac9803ff656b946bf07ab2a91f1 Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:53:12 +0530 Subject: [PATCH] feat: replace loading skeleton in ReportPanel with a new animated skeleton component --- .../components/report-panel/report-panel.tsx | 69 ++++++++----------- 1 file changed, 27 insertions(+), 42 deletions(-) diff --git a/surfsense_web/components/report-panel/report-panel.tsx b/surfsense_web/components/report-panel/report-panel.tsx index c602a3f04..6ec2a08eb 100644 --- a/surfsense_web/components/report-panel/report-panel.tsx +++ b/surfsense_web/components/report-panel/report-panel.tsx @@ -18,14 +18,39 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { Skeleton } from "@/components/ui/skeleton"; import { useMediaQuery } from "@/hooks/use-media-query"; import { baseApiService } from "@/lib/apis/base-api.service"; import { authenticatedFetch } from "@/lib/auth-utils"; +function ReportPanelSkeleton() { + return ( +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ); +} + const PlateEditor = dynamic( () => import("@/components/editor/plate-editor").then((m) => ({ default: m.PlateEditor })), - { ssr: false, loading: () => } + { ssr: false, loading: () => } ); /** @@ -59,46 +84,6 @@ const ReportContentResponseSchema = z.object({ type ReportContentResponse = z.infer; type VersionInfo = z.infer; -/** - * Shimmer loading skeleton for report panel - */ -function ReportPanelSkeleton() { - return ( -
- {/* Title skeleton */} -
- - {/* Paragraph 1 */} -
-
-
-
-
-
- - {/* Heading */} -
- - {/* Paragraph 2 */} -
-
-
-
-
- - {/* Heading */} -
- - {/* Paragraph 3 */} -
-
-
-
-
-
- ); -} - /** * Inner content component used by desktop panel, mobile drawer, and the layout right panel */