react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Horizontal / cross axis flipping for popovers

Open OliverJAsh opened this issue 8 months ago โ€ข 1 comments

Provide a general summary of the feature here

Popovers already support flipping the vertical placement. Should they also support flipping the horizontal placement aka cross axis? That would avoid awkward looking popovers such as this:

Image

Reduced test case: https://stackblitz.com/edit/vitejs-vite-7ahmt11q?file=src%2Fmain.css,src%2FApp.tsx&terminal=dev

I believe Floating UI has this behaviour: https://floating-ui.com/docs/flip#crossaxis

๐Ÿค” Expected Behavior?

See above.

๐Ÿ˜ฏ Current Behavior

See above.

๐Ÿ’ Possible Solution

See above.

๐Ÿ”ฆ Context

See above.

๐Ÿ’ป Examples

No response

๐Ÿงข Your Company/Team

Unsplash

๐Ÿ•ท Tracking Issue

No response

OliverJAsh avatar May 01 '25 07:05 OliverJAsh

Seems like a reasonable feature to support. Though to be totally honest, we're hoping not to do too much work on our overlay positioning code and instead move to native CSS anchor positioning in the future.

devongovett avatar May 06 '25 02:05 devongovett