From baa02c50e4cca1d4fcecda5f3640f9c96103236c Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Tue, 17 Feb 2026 21:27:01 +0530 Subject: [PATCH] refactor: replace Pencil icon with PenLine in RowActions and update loading state with Skeleton components in editor page --- .../(manage)/components/RowActions.tsx | 6 +- .../editor/[documentId]/page.tsx | 70 ++++++++++++++++--- 2 files changed, 63 insertions(+), 13 deletions(-) diff --git a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx index 137c02f27..ba252bd16 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/RowActions.tsx @@ -1,6 +1,6 @@ "use client"; -import { MoreHorizontal, Pencil, Trash2 } from "lucide-react"; +import { MoreHorizontal, PenLine, Trash2 } from "lucide-react"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { toast } from "sonner"; @@ -115,7 +115,7 @@ export function RowActions({ isEditDisabled ? "text-muted-foreground cursor-not-allowed opacity-50" : "" } > - + Edit {shouldShowDelete && ( @@ -170,7 +170,7 @@ export function RowActions({ isEditDisabled ? "text-muted-foreground cursor-not-allowed opacity-50" : "" } > - + Edit {shouldShowDelete && ( diff --git a/surfsense_web/app/dashboard/[search_space_id]/editor/[documentId]/page.tsx b/surfsense_web/app/dashboard/[search_space_id]/editor/[documentId]/page.tsx index 98564a8ba..dd65ae56c 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/editor/[documentId]/page.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/editor/[documentId]/page.tsx @@ -20,7 +20,7 @@ import { } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; -import { Spinner } from "@/components/ui/spinner"; +import { Skeleton } from "@/components/ui/skeleton"; import { notesApiService } from "@/lib/apis/notes-api.service"; import { authenticatedFetch, getBearerToken, redirectToLogin } from "@/lib/auth-utils"; @@ -30,8 +30,22 @@ const PlateEditor = dynamic( { ssr: false, loading: () => ( -
- +
+ +
+ + + +
+
+ + + +
+
+ + +
), } @@ -314,13 +328,49 @@ export default function EditorPage() { if (loading) { return ( -
- - - -

Loading editor

-
-
+
+ {/* Top bar skeleton — real back button & file icon, skeleton title */} +
+
+ + + +
+
+ + {/* Fixed toolbar placeholder — matches real toolbar styling */} +
+ + {/* Content area skeleton — mimics document text lines */} +
+
+ {/* Title-like line */} + + {/* Paragraph lines */} +
+ + + +
+
+ + + +
+
+ + +
+
+
); }