Skip to content

Commit 03d63c8

Browse files
feat(ui): enhance drag-and-drop upload feedback with animated icon and aria-live announcement
1 parent d8b3feb commit 03d63c8

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

frontend/src/components/document/DocumentSidebar.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Input } from "@/components/ui/input";
1111
import { Badge } from "@/components/ui/badge";
1212
import { Progress } from "@/components/ui/progress";
1313
import {
14-
FileText, Upload, Trash2, FileCheck, Clock, AlertCircle, Loader2, FolderOpen, Cloud,
14+
FileText, Upload, UploadCloud, Trash2, FileCheck, Clock, AlertCircle, Loader2, FolderOpen, Cloud,
1515
} from "lucide-react";
1616
import { useDropzone } from "react-dropzone";
1717
import { Settings } from "lucide-react";
@@ -290,8 +290,15 @@ export default function DocumentSidebar({
290290
</div>
291291
) : (
292292
<>
293-
<Upload className="w-5 h-5 mx-auto text-muted-foreground mb-2" />
294-
<p className="text-xs text-muted-foreground">
293+
{isDragActive ? (
294+
<UploadCloud className="w-6 h-6 mx-auto text-primary mb-2 animate-bounce" />
295+
) : (
296+
<Upload className="w-5 h-5 mx-auto text-muted-foreground mb-2" />
297+
)}
298+
<p
299+
className={`text-xs transition-colors ${isDragActive ? "text-primary font-medium" : "text-muted-foreground"}`}
300+
aria-live="polite"
301+
>
295302
{isDragActive ? t("documents.dropHere") : t("documents.dropOrClick")}
296303
</p>
297304
<p className="text-[10px] text-muted-foreground/60 mt-1">
@@ -483,4 +490,4 @@ export default function DocumentSidebar({
483490
)}
484491
</div>
485492
);
486-
}
493+
}

0 commit comments

Comments
 (0)