-
Notifications
You must be signed in to change notification settings - Fork 4.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
Global styles revisions: migrate API call to getRevisions() #56349
Global styles revisions: migrate API call to getRevisions() #56349
Conversation
…g *ThemeGlobalStyleRevision selector and action.
Size Change: +126 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
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.
Nice catch. I forgot that there's a limit of 10 not 100 now 😄 To achieve parity it has to be 100. I'll set it. |
'globalStyles', | ||
__experimentalGetCurrentGlobalStylesId(), | ||
{ | ||
per_page: 100, |
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.
At the moment there's a limit of 100 revisions set by WP_REST_Controller
Limit the results per page to 100 until we can implement pagination. See:
Thanks to @andrewserong for reminding me 😴
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.
Thanks for the update @ramonjd, that's all testing nicely for me now, and there's no warnings in the site editor about deprecated calls, either 👍
LGTM! ✨
What?
Ho!
Now that the core data revisions API is merged, we can use it to fetch global styles revisions and deprecate the old stuff, namely the
*ThemeGlobalStyleRevision
selector and action.Why?
We must sacrifice in the name of progress.
Testing Instructions
Fire up the site editor, and make/save global styles changes.
Check that there are no regressions to the global styles revisions list, especially:
Here are some demonstration videos we prepared earlier:
2023-11-21.11.26.36.mp4
2023-11-21.11.25.03.mp4