+
Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

clintcs
Copy link
Collaborator

@clintcs clintcs commented Jul 25, 2025

🚀 Description

Replaced instances of aTimeout(0) in tests with requestIdleCallback() so tests, especially in CI, are less flaky. Also see #1001 (comment).

📋 Checklist

  • I have followed the Contributing Guidelines.
  • I have added tests to cover new or updated functionality.
  • I have added or updated Storybook stories.
  • I have localized new strings.
  • I have followed the ARIA Authoring Practices Guide or met with the Accessibility Team.
  • I have included a changeset.
  • I have scheduled a design review.
  • I have reviewed the Storybook and Visual Test Report links below.

🔬 Testing

If the tests pass we're good.

Copy link

changeset-bot bot commented Jul 25, 2025

⚠️ No Changeset found

Latest commit: 479218e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR


// Wait for the Resize Observer to do its thing.
await aTimeout(0);
await requestIdleCallback(); // Wait for the Resize Observer
Copy link
Collaborator Author

@clintcs clintcs Jul 25, 2025

Choose a reason for hiding this comment

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

Resize Observers are another good candidate for requestIdleCallback() because, like waiting for Floating UI, there's no guarantee that a Resize Observer's callback is called within a single tick.

@clintcs clintcs force-pushed the replace-atimeout-with-request-idle-callback branch from fd6a1fa to 56caaf3 Compare July 25, 2025 17:22
@clintcs clintcs force-pushed the replace-atimeout-with-request-idle-callback branch from 56caaf3 to 479218e Compare July 25, 2025 17:28
@clintcs clintcs marked this pull request as ready for review July 25, 2025 17:39
Copy link
Collaborator

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

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

🎉

@clintcs clintcs added this pull request to the merge queue Jul 25, 2025
Merged via the queue into main with commit e60ed2f Jul 25, 2025
29 checks passed
@clintcs clintcs deleted the replace-atimeout-with-request-idle-callback branch July 25, 2025 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载