unovue / radix-vue

Vue port of Radix UI Primitives. An open-source UI component library for building high-quality, accessible design systems and web apps.
https://radix-vue.com
MIT License
3.74k stars 233 forks source link

[Popper, Submenus]feat: add safe polygon feature #169

Closed k11q closed 1 year ago

k11q commented 1 year ago

enhancement: add safe polygon feature for better UX and accessibility:

Reference

https://github.com/floating-ui/floating-ui/blob/073da89da80577565a69cebd786430e11ea9e3bc/packages/react/src/safePolygon.ts

https://floating-ui.com/docs/useHover#safepolygon

https://height.app/blog/guide-to-build-context-menus

https://github.com/radix-ui/primitives/pull/688 #214

k11q commented 1 year ago

@zernonia do you think this can be done with floating ui? they have that feature supported in react. ref: https://github.com/radix-ui/primitives/pull/688 https://floating-ui.com/docs/useHover#safepolygon

zernonia commented 1 year ago

I think that's possible. I'm thinking to create a package floating-ui/vue-composable to have all the build in feature similar to React. That way we could benefit Vue community with that feature, and not limited to Radix-Vue.

But yeah I can implement this here to test it out 😁

k11q commented 1 year ago

I think that's possible. I'm thinking to create a package floating-ui/vue-composable to have all the build in feature similar to React. That way we could benefit Vue community with that feature, and not limited to Radix-Vue.

But yeah I can implement this here to test it out 😁

yeah thats a huge task, I think floating-ui team wouldnt mind if you lead the official floating-ui/vue package. but yeah, huge task 😂