-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Add withSuspenseConfig API #15593
Merged
Merged
Add withSuspenseConfig API #15593
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
dae328f
Add suspendIfNeeded API and a global scope to track it
sebmarkbage 53f94f9
Add the suspenseConfig to all updates created during this scope
sebmarkbage 58671af
Compute expiration time based on the timeout of the suspense config
sebmarkbage aee7a4a
Track if there was a processed suspenseConfig this render pass
sebmarkbage f80e403
Mark suspended states that should be avoided as a separate flag
sebmarkbage b9e467a
Suspend until the full expiration time if something asked to suspend
sebmarkbage df782f6
Reenable an old test that we can now repro again
sebmarkbage 8660f24
Suspend the commit even if it is complete if there is a minimum delay
sebmarkbage 044af3c
Default timeoutMs to low pri expiration if not provided
sebmarkbage 0c902e4
Rename to withSuspenseConfig and drop the default config
sebmarkbage 367354d
Track the largest suspense config expiration separately
sebmarkbage 1f889b6
Add basic tests for functionality using each update mechanism
sebmarkbage d937e45
Fix issue when newly created avoided boundary doesn't suspend with delay
sebmarkbage 4347de6
Add test for loading indicator with minLoadingDurationMs option
sebmarkbage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that batches never suspend, but I'm not sure it makes sense for them to suspend anyway since they control the commit anyway. I'm not sure when the promise should resolve in this new multi-commit world.