Skip to content

Commit 55d4f97

Browse files
committed
polish: enhance processing list animations
- Add AnimatePresence for smooth enter/exit transitions - Spring physics for natural feeling motion - Staggered delays for cascade effect - Current file highlighted (brighter text + icon) - Subtle scale animation on enter/exit - Layout animation for smooth reordering
1 parent 1f845e4 commit 55d4f97

1 file changed

Lines changed: 35 additions & 12 deletions

File tree

frontend/src/components/IndexingProgressModal.tsx

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,41 @@ export function IndexingProgressModal({
188188
{phase === 'indexing' && recentFiles.length > 0 && (
189189
<div className="mt-4">
190190
<p className="text-sm text-zinc-400 mb-2">Processing</p>
191-
<div className="space-y-1 max-h-32 overflow-y-auto">
192-
{recentFiles.slice(0, 5).map((file, i) => (
193-
<motion.div
194-
key={`${file}-${i}`}
195-
initial={{ opacity: 0, x: -10 }}
196-
animate={{ opacity: 1 - i * 0.15, x: 0 }}
197-
className="flex items-center gap-2 text-sm"
198-
>
199-
<FileCode2 className="w-3.5 h-3.5 text-indigo-400 flex-shrink-0" />
200-
<span className="text-zinc-300 truncate">{file}</span>
201-
</motion.div>
202-
))}
191+
<div className="space-y-1.5 overflow-hidden">
192+
<AnimatePresence mode="popLayout" initial={false}>
193+
{recentFiles.slice(0, 5).map((file, i) => (
194+
<motion.div
195+
key={file}
196+
layout
197+
initial={{ opacity: 0, x: -20, scale: 0.95 }}
198+
animate={{
199+
opacity: i === 0 ? 1 : 0.7 - i * 0.12,
200+
x: 0,
201+
scale: 1,
202+
transition: {
203+
type: "spring",
204+
stiffness: 500,
205+
damping: 30,
206+
delay: i * 0.03
207+
}
208+
}}
209+
exit={{
210+
opacity: 0,
211+
x: 20,
212+
scale: 0.95,
213+
transition: { duration: 0.2 }
214+
}}
215+
className={`flex items-center gap-2 text-sm ${
216+
i === 0 ? 'text-white' : 'text-zinc-400'
217+
}`}
218+
>
219+
<FileCode2 className={`w-3.5 h-3.5 flex-shrink-0 ${
220+
i === 0 ? 'text-indigo-400' : 'text-zinc-500'
221+
}`} />
222+
<span className="truncate">{file}</span>
223+
</motion.div>
224+
))}
225+
</AnimatePresence>
203226
</div>
204227
</div>
205228
)}

0 commit comments

Comments
 (0)