Skip to content

Feat: hooks improves #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2025
Merged

Feat: hooks improves #17

merged 3 commits into from
Jun 19, 2025

Conversation

wh1teee
Copy link
Owner

@wh1teee wh1teee commented Jun 19, 2025

No description provided.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Snap Animations Ignore Drag Velocity

Snap animations no longer respect the velocity of drag gestures. The config.velocity parameter, previously derived from input.velocity, was removed from the asyncSet call within the snapSmoothly action. This makes animations less responsive and feel unnatural, as they always use a default velocity regardless of user input speed.

src/BottomSheet.tsx#L335-L356

await asyncSet({
y: defaultSnapRef.current,
ready: 1,
maxHeight: maxHeightRef.current,
maxSnap: maxSnapRef.current,
// Using defaultSnapRef instead of minSnapRef to avoid animating `height` on open
minSnap: defaultSnapRef.current,
immediate: prefersReducedMotion.current,
})
}),
snapSmoothly: fromPromise(async ({ input }) => {
const snap = findSnapRef.current(input?.y || 0)
heightRef.current = snap
lastSnapRef.current = snap
await asyncSet({
y: snap,
ready: 1,
maxHeight: maxHeightRef.current,
maxSnap: maxSnapRef.current,
minSnap: minSnapRef.current,
immediate: prefersReducedMotion.current,
})

Fix in Cursor


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

@wh1teee wh1teee merged commit b64f68d into develop Jun 19, 2025
1 check passed
Copy link

🎉 This PR is included in version 3.5.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 4.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant