From 183dfc4443d25d80c75cc24075f50925957027a0 Mon Sep 17 00:00:00 2001 From: Naitik Date: Sat, 13 Jun 2026 18:56:39 +0530 Subject: [PATCH 1/2] feat(ui): enhance drag-and-drop upload feedback with animated icon and aria-live announcement --- .../src/components/document/DocumentSidebar.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/document/DocumentSidebar.tsx b/frontend/src/components/document/DocumentSidebar.tsx index 4ffd3524..8cc0f76f 100644 --- a/frontend/src/components/document/DocumentSidebar.tsx +++ b/frontend/src/components/document/DocumentSidebar.tsx @@ -11,7 +11,7 @@ import { Input } from "@/components/ui/input"; import { Badge } from "@/components/ui/badge"; import { Progress } from "@/components/ui/progress"; import { - FileText, Upload, Trash2, FileCheck, Clock, AlertCircle, Loader2, FolderOpen, Cloud, + FileText, Upload, UploadCloud, Trash2, FileCheck, Clock, AlertCircle, Loader2, FolderOpen, Cloud, } from "lucide-react"; import { useDropzone } from "react-dropzone"; import { Settings } from "lucide-react"; @@ -290,8 +290,15 @@ export default function DocumentSidebar({ ) : ( <> - -

+ {isDragActive ? ( + + ) : ( + + )} +

{isDragActive ? t("documents.dropHere") : t("documents.dropOrClick")}

@@ -483,4 +490,4 @@ export default function DocumentSidebar({ )} ); -} +} \ No newline at end of file From 36aa0763382723151c32c9d0cff94b6a5fe63396 Mon Sep 17 00:00:00 2001 From: Naitik Date: Sat, 13 Jun 2026 19:08:11 +0530 Subject: [PATCH 2/2] style: fix prettier formatting --- .../components/document/DocumentSidebar.tsx | 240 +++++++++++------- 1 file changed, 151 insertions(+), 89 deletions(-) diff --git a/frontend/src/components/document/DocumentSidebar.tsx b/frontend/src/components/document/DocumentSidebar.tsx index 8cc0f76f..42f49d6d 100644 --- a/frontend/src/components/document/DocumentSidebar.tsx +++ b/frontend/src/components/document/DocumentSidebar.tsx @@ -11,7 +11,16 @@ import { Input } from "@/components/ui/input"; import { Badge } from "@/components/ui/badge"; import { Progress } from "@/components/ui/progress"; import { - FileText, Upload, UploadCloud, Trash2, FileCheck, Clock, AlertCircle, Loader2, FolderOpen, Cloud, + FileText, + Upload, + UploadCloud, + Trash2, + FileCheck, + Clock, + AlertCircle, + Loader2, + FolderOpen, + Cloud, } from "lucide-react"; import { useDropzone } from "react-dropzone"; import { Settings } from "lucide-react"; @@ -32,7 +41,10 @@ function DocumentListSkeleton() { return (

)} @@ -479,10 +539,12 @@ export default function DocumentSidebar({ { // Close the modal when open is false + onOpenChange={(open) => { + // Close the modal when open is false if (!open) setSettingsDoc(null); // Clear the settingsDoc state to close the modal }} - onSettingsSaved={() => { // Refresh documents after saving settings + onSettingsSaved={() => { + // Refresh documents after saving settings onDocumentsChange(); // Refresh the document list to reflect any changes setSettingsDoc(null); // Close the settings modal after saving }} @@ -490,4 +552,4 @@ export default function DocumentSidebar({ )} ); -} \ No newline at end of file +}