Skip to content
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

Add: useClientPoint #117

Open
endigo9740 opened this issue May 23, 2024 · 6 comments
Open

Add: useClientPoint #117

endigo9740 opened this issue May 23, 2024 · 6 comments
Labels
feature request Request a new feature to add. help wanted Extra attention is needed
Milestone

Comments

@endigo9740
Copy link
Contributor

endigo9740 commented May 23, 2024

Reference

https://floating-ui.com/docs/useClientPoint

Description

Positions the floating element at a given client point (x, y), usually generated by a mouse event. By default, the client’s mouse position is automatically tracked.

Props

https://floating-ui.com/docs/useClientPoint#props

@endigo9740 endigo9740 added feature request Request a new feature to add. help wanted Extra attention is needed labels May 23, 2024
@endigo9740 endigo9740 added this to the v1.0 milestone May 23, 2024
@edwardnguyen225
Copy link

edwardnguyen225 commented May 23, 2024

@endigo9740 May I tackle this issue for you guys? I'm happy to contribute to Svelte libraries.

@endigo9740
Copy link
Contributor Author

endigo9740 commented May 23, 2024

Hey @edwardnguyen225 as mentioned on Discord, this should be fine, but I'll let @Hugos68 confirm. I'll let him assign the ticket if he gives the thumbs up.

In the meantime, here's the React source to reference:
https://github.com/floating-ui/floating-ui/blob/master/packages/react/src/hooks/useClientPoint.ts

And of course feel free to browse how the other hooks have been implemented. I'm planning to review the useFocus hook tomorrow, which introduces a number of utilities that might overlap.

Thanks!

@Hugos68
Copy link
Collaborator

Hugos68 commented May 23, 2024

@edwardnguyen225 Feel free to go ahead and port this hook, like Chris said you can use other hooks as well as our contribution guide to guide you, thanks!

@Hugos68
Copy link
Collaborator

Hugos68 commented May 27, 2024

@edwardnguyen225 Do you still want to take on this hook? We want to move forward with this, otherwise I'll be happy to take over.

@edwardnguyen225
Copy link

@Hugos68 Apologies for the delay, I've been occupied with interviews. Please go ahead without me. I'll be sure to contribute to another feature soon.

@Hugos68
Copy link
Collaborator

Hugos68 commented May 27, 2024

No worries, we're just trying to move fast since we've got another project waiting for this port 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a new feature to add. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants