-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
feat: drawer handle component #182
Conversation
@rortan134 is attempting to deploy a commit to the emil Team on Vercel. A member of the Team first needs to authorize it. |
if (snapPointsOffset && newIndex && typeof snapPointsOffset[newIndex] === 'number') { | ||
snapToPoint(snapPointsOffset[newIndex] as number); | ||
} | ||
} | ||
}, [activeSnapPointProp, snapPoints, snapPointsOffset, snapToPoint]); | ||
}, [activeSnapPoint, activeSnapPointProp, snapPoints, snapPointsOffset, snapToPoint]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed in order to setActiveSnapPoint
updates to sync
After attempting to integrate the drawer with my scrollable content, I've realized there are issues I'd prefer not to handle. The handle component addresses these by clearly separating content scrolling from drawer drag gestures. Can you update this handle component to allow the drawer to be dragged exclusively by the handle? |
I think that's alright as long as @emilkowalski is fine with it |
@rortan134 This is so cool, could you update it based on @mlshv suggestions? We can also update the readme |
@rortan134 hey, do you need help with this? I am very interested in this being shipped, would be glad to assist 😌 |
I think a more composable approach would be to have a drawer.header that would handle the gestures and let the handle have its own interactions (tapping, etc.). This is fine though |
@rortan134 Great PR! I was just browsing the repo to see if I could contribute this.
Edit: I re-read the code and your PR comment and you are calling it Let me know if I can help getting this across the finish line! |
@rortan134 I don't fully get your commen,t but the video on the right where the whole header is draggable makes more sense to me. Is this PR ready? |
Should be, although the first vid is the default |
Hmm... seems like some tests are failing. @rortan134 Could you take a look please? |
It looks good. I hope to have this feature soon. |
Can we fix merge conflicts? Looks good otherwise! |
Don't wanna rush but would really love this feature so if I can do anything to help get this shipped, please let me know. |
I would like to use this drawer below the content, can't seem to get it to work since my drawer direction is top. |
An optional complementary component. Implements Apple's grabber practices:
<Drawer.Handle />
I added some style defaults but let me know if it's better without