Conversation
Can we have test instructions for the before and after's for each of these? There are no tests or stories or instructions for existing stories, so it's a bit hard to tell what all these changes are for or how they are improvements. |
|
@snowystinger Yes, absolutely. I can come back with a test suite, but I haven't really yet gotten a definitive signal about whether or not these PRs are even something you want merged. I understand the dilemma from a reviewers perspective though. It's hard to tell which bugs this fixes without tests, but its also too much work to add tests for something you might not even want 😅 As a general rule of thumb, what this PR does is bring react-aria reasonably up to par with https://github.com/scroll-into-view/compute-scroll-into-view in terms of edge case handling. The biggest issues and features are: For
For
Then for the primarily new features:
In terms of a very high-level roadmap, you have to imagine any PR I'm opening as work towards getting a Navigation Component/Carousel into React Aria. I'm not giving up until that's done, haha. |
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
getScrollParentandgetScrollParentsby merging their implementation into a new generator2.) Fix various bugs in
isScrollableand expand its scope for window scrolling3.) Introduce modalities and axis isolation into scroll utilities (
pointer-> skip hidden,virtual-> incl. hidden)The rest is just chores of moving code blocks from
calculatePositionanddomHelpers.✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: