-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Core Data: Remove conditions for selector resolutions #71575
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +38 B (0%) Total Size: 1.94 MB
ℹ️ View Unchanged
|
| function getResolutionsArgs( records, recordsQuery ) { | ||
| const queryArgs = Object.fromEntries( | ||
| Object.entries( recordsQuery ).filter( ( [ k, v ] ) => { | ||
| return [ 'context', '_fields' ].includes( k ) && !! v; |
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.
There are global parameters; the remaining query fields will be actual query arguments. I'm debating if it's worth extracting into a separate constant.
|
Flaky tests detected in 60e8a7f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17606917953
|
priethor
left a comment
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.
Changes in both functionality and tests look good, nothing to add 💯
60e8a7f to
5447866
Compare
What?
Part of #26629.
Related #71541.
PR removes the conditions for batch resolving selectors after fetching the collection. If consumers fetch the same record with the same global query parameters down the React tree, they will be pre-resolved.
Why?
This should improve performance and prevent additional HTTP queries for UIs like DataViews.
Testing Instructions
Test Snippets
Testing Instructions for Keyboard
Same.