Conversation
|
Size Change: +1.03 kB (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in f884bf1. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5481911069
|
f884bf1 to
4e70212
Compare
| * | ||
| * @return array Updated array of arguments for WP_Query. | ||
| */ | ||
| function gutenberg_rest_wp_block_query( $args, $request ) { |
There was a problem hiding this comment.
This patch adds the ability to pass sync_status query parameter to the /wp/v2/blocks api. Allowed values for now are fully and unsynced.
| // Refetch total pages when `patterns` changes. | ||
| // This is not a good indicator of when to refetch the total pages, | ||
| // but the only one we have for now. | ||
| useEffect( () => { |
There was a problem hiding this comment.
This is not fine-tuned. It currently will fire a lot of requests since we're not sure when to fetch this info. A more elegant solution will be baking this into getEntityRecords somehow. The REST API already supports this by returning the X-Wp-Totalpages response header. However, getEntityRecords (and apiFetch under the hood) doesn't support it yet. It might require multiple levels of coordination across different packages to implement this though.
| ); | ||
|
|
||
| return ( | ||
| <HStack spacing={ 2 } alignment="center"> |
There was a problem hiding this comment.
We need to revisit the styling and accessibility 😅.
| useEffect( () => { | ||
| return history.listen( ( { location: updatedLocation } ) => { | ||
| setLocation( getLocationWithParams( updatedLocation ) ); | ||
| startTransition( () => { |
There was a problem hiding this comment.
This is not needed. I was just playing with the idea and forgot to delete it 😅 .
What?
Alternative to #52303.
WIP
Why?
WIP
How?
WIP
Testing Instructions
WIP
Testing Instructions for Keyboard
WIP
Screenshots or screencast