Skip to content

Conversation

@snowystinger
Copy link
Member

Closes

Precursor to supporting ESM. It'll be easier to review this as a separate PR.

✅ 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:

@snowystinger snowystinger marked this pull request as ready for review November 2, 2022 23:00
setScrolling(false);
}, [virtualizer]);

let state = useMemo(() => ({
Copy link
Member Author

Choose a reason for hiding this comment

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

memo state so it doesn't cause unnecessary onLoadMore calls, this appeared after blurring the combobox and it beginning to exit in 16 and 17

@adobe-bot
Copy link

@snowystinger snowystinger mentioned this pull request Nov 2, 2022
5 tasks
reidbarber
reidbarber previously approved these changes Nov 4, 2022
@adobe-bot
Copy link

@adobe-bot
Copy link

@adobe adobe deleted a comment from adobe-bot Nov 9, 2022
@adobe-bot
Copy link

# Conflicts:
#	packages/@react-spectrum/list/package.json
#	packages/@react-spectrum/overlays/package.json
@adobe-bot
Copy link

// raf
act(() => {jest.advanceTimersToNextTimer();});
// exited
act(() => {jest.advanceTimersToNextTimer();});
Copy link
Member

Choose a reason for hiding this comment

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

Why are we wanting to timers so specifically? Verse jest.runAllTimers()

Copy link
Member Author

Choose a reason for hiding this comment

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

each timer causes a state change, all state changes must happen within an act, once the act is done, the state changes are resolved. in this case, the state changes must be resolved separately because they influence what happens to the next timer.

there are still instances where you'd want to potentially advance multiple timers at once, which is what happens in the majority of our tests

@adobe-bot
Copy link

@snowystinger snowystinger merged commit 853c60c into main Nov 18, 2022
@snowystinger snowystinger deleted the upgrade-react-transition-group branch November 18, 2022 23:17
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.

5 participants