Skip to content

feat: add test for improvement of collections in React transitions #8209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 13, 2025

Conversation

nwidynski
Copy link
Contributor

@nwidynski nwidynski commented May 9, 2025

Closes #8204 (comment)

Essentially, React would call our appendChild to update the fake DOM, we'd trigger the useSyncExternalStore subscription, and React would interrupt itself and start over.

When React starts over, it causes Table to invoke its render function again, which we can spy on reliably.

✅ 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

📝 Test Instructions:

🧢 Your Project:

Copy link
Member

@LFDanLu LFDanLu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, verified the test caught the excess renders when reverting #8204, thanks!

@LFDanLu LFDanLu added this pull request to the merge queue May 13, 2025
Merged via the queue into adobe:main with commit 0ef9421 May 13, 2025
30 checks passed
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.

3 participants