adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.12k stars 1.06k forks source link

Expose FocusableProvider from monopackage #6578

Open snowystinger opened 1 week ago

snowystinger commented 1 week ago

Closes https://github.com/adobe/react-spectrum/issues/6574

Is this something we want to expose? Docs?

โœ… Pull Request Checklist:

๐Ÿ“ Test Instructions:

๐Ÿงข Your Project:

LFDanLu commented 1 week ago

I still feel a bit iffy about exposing FocusableProvider since it feels like using this provider may cause various props to unintentionally be added to components that have useFocusable called for them under the hood via their hooks. Users would need to make sure only to just wrap the TooltipTrigger children with it, which isn't so bad since that seem to be the only use case for it right now but that could potentially change in the future. Maybe since the current usage is so limited to specifically tooltips we could perhaps instead tweak the hooks or add a solely tooltip specific way of propagating the pointerEnter/other props from useTooltipTrigger to tooltip button?

snowystinger commented 1 week ago

Linking another comment from a confused user https://github.com/adobe/react-spectrum/issues/1175#issuecomment-2083073184