adobe / adobe/react-spectrum

Horizontal / cross axis flipping for popovers

Open
#8,173 2 comments 0 reactions 0 assignees View on GitHub
Overlay Positioning Overlays
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Run the reduced test case in src/main.css and src/App.tsx from the linked StackBlitz reproduction to observe the current placement. Then locate the popover positioning entry point and verify that horizontal, cross-axis flipping is supported; done means awkward overflow placements are avoided as described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.