Skip to content

feat: Add OverlayPositioner interface + DefaultOverlayPositioner & AnchorOverlayPositioner - #5

Open
nwidynski wants to merge 1 commit into
feat-box-layoutfrom
feat-positioner
Open

nwidynski wants to merge 1 commit into
feat-box-layoutfrom
feat-positioner

Conversation

@nwidynski

@nwidynski nwidynski commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Moves overlay placement in useOverlayPosition behind an OverlayPositioner interface (subscribe/update), built on the DOMResizableBox and DOMAnchorBox primitives.

  • DefaultOverlayPositioner: calculatePosition, observing target, overlay, viewport and custom boundary boxes.
  • AnchorOverlayPositioner: native CSS anchor positioning (position-area, position-try-fallbacks), with the applied placement read back for the arrow and origin-aware animations.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices
  • I understand every change in this PR and can explain why it's there.
  • If AI-assisted, I followed our AI contribution guidance and pointed my assistant at AGENTS.md.

📝 Test Instructions:

🧢 Your Project:

Moves overlay placement in useOverlayPosition behind an OverlayPositioner
interface (subscribe/update), built on the DOMResizableBox and DOMAnchorBox
primitives.

- DefaultOverlayPositioner: calculatePosition, observing target, overlay,
  viewport and custom boundary boxes.
- AnchorOverlayPositioner: native CSS anchor positioning (position-area,
  position-try-fallbacks), with the applied placement read back for the
  arrow and origin-aware animations.
- Popover stories for both positioners in a resizable container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nwidynski nwidynski changed the title feat: OverlayPositioner w/ DefaultOverlayPositioner and native AnchorOverlayPositioner feat: OverlayPositioner w/ DefaultOverlayPositioner and native AnchorOverlayPositioner Oct 3, 2026
@nwidynski nwidynski changed the title feat: OverlayPositioner w/ DefaultOverlayPositioner and native AnchorOverlayPositioner feat: Add OverlayPositioner interface + DefaultOverlayPositioner & AnchorOverlayPositioner Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant