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

`react-aria-components/Tooltip`: `state.placement` should receive full `Placement` instead of `PlacementAxis`

Open unional opened this issue 4 weeks ago โ€ข 4 comments

Provide a general summary of the feature here

Currently the state.placement in className or style callback is a PlacementAxis, which only contains top | bottom | left | right.

When the position of the tooltip needs to adjust, it may also need to flip.

e.g. a button at the top-left corner with a tooltip placement='top end' should flip on both axis to bottom start.

Currently we only get bottom which does not provide enough information to adjust the css accordingly.

image

๐Ÿค” Expected Behavior?

state.placement contain full Placement information.

๐Ÿ˜ฏ Current Behavior

state.placement only contains PlacementAxis values.

By the way, do you know in what case state.placement will contain the value center?

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

The solution is not complete.

๐Ÿ’ป Examples

No response

๐Ÿงข Your Company/Team

Palo Alto Networks

๐Ÿ•ท Tracking Issue

No response

unional avatar Jun 08 '24 01:06 unional