feat(card-sorting): gentler spring animation for locked cards

When a card transitions from being dragged to its locked position
in the prefix/suffix grid, use a gentler spring animation to make
the transition more visible and pleasing.

Animation config:
- Locked cards: tension 120, friction 26 (gentle, floaty)
- Normal cards: tension 300, friction 30 (snappy, responsive)

This allows users to see the card "gently come out of the drag"
and smoothly settle into its permanent grid position, rather than
snapping there instantly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-10-23 22:22:04 -05:00
parent ae45298ec4
commit 47189cb6e7

View File

@@ -782,10 +782,17 @@ function AnimatedCard({
// Position and rotation are immediate when dragging or resizing // Position and rotation are immediate when dragging or resizing
return isDragging || isResizing return isDragging || isResizing
}, },
config: { config: isCorrectPosition
tension: 300, ? {
friction: 30, // Gentler animation when moving to locked position
}, tension: 120,
friction: 26,
}
: {
// Snappier for normal movements
tension: 300,
friction: 30,
},
}) })
return ( return (