Skip to content

feat: rework scroll utilities and fix layout bugs - #10556

Open
nwidynski wants to merge 2 commits into
adobe:mainfrom
nwidynski:fix-scrollable
Open

feat: rework scroll utilities and fix layout bugs#10556
nwidynski wants to merge 2 commits into
adobe:mainfrom
nwidynski:fix-scrollable

Conversation

@nwidynski

@nwidynski nwidynski commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Closes no issues directly, because this PR is intentionally limited to additions only. Migrating call sites to the new utilities and signatures is to be done in chore follow-ups, because it would otherwise be rather hard to review what changed here.

From a high level, this is the first round of changes for a set of layout- and drastically improved scroll utilities. Here is what this PR does today:

1.) Fix issues in getScrollParent and getScrollParents by merging their implementation into a new generator
2.) Fix various bugs in isScrollable and expand its scope for window scrolling
3.) Introduce modalities and axis isolation into scroll utilities (pointer-> skip hidden, virtual -> incl. hidden)

The rest is just chores of moving code blocks from calculatePosition and domHelpers.

✅ 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 CLAUDE.md.

📝 Test Instructions:

🧢 Your Project:

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