Skip to content
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: move from experimental to 6.3 #51474

Merged
merged 5 commits into from
Jun 14, 2023

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jun 13, 2023

Does not require backporting to Core - shuffling files in Gutenberg and backporting from core changes in WordPress/wordpress-develop#4606 only

What and why?

  1. Removing gutenberg_update_global_styles_rest_controller hook as its not required for 6.3 and was unrelated to the addition of the global styles /revisions endpoint in the first place. (Introduced in Rest API: add /revisions endpoint for global styles #49974)
  2. Moving global styles revisions endpoint file to 6-3 since it'll be included in 6.3 and is not experimental. (Introduced in Rest API: add /revisions endpoint for global styles #49974)
  3. Backporting changes from core to gutenberg: adding prepare_date_response to parse dates (From Rest API: add /revisions endpoint for global styles  wordpress-develop#4606)

Testing

Tests should pass as expected

…s not required for 6.3 and was unrelated to the addition of the /revisions endpoint in the first place

Moving global styles revisions endpoint file to 6-3 since it'll be included in 6.3 and is not experimental
@ramonjd ramonjd self-assigned this Jun 13, 2023
@ramonjd ramonjd added [Type] Code Quality Issues or PRs that relate to code quality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jun 13, 2023
@github-actions
Copy link

Flaky tests detected in abad5d9.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5262111962
📝 Reported issues:

*/
function gutenberg_update_global_styles_rest_controller( $args, $post_type ) {
if ( in_array( $post_type, array( 'wp_global_styles' ), true ) ) {
$args['rest_controller_class'] = 'Gutenberg_REST_Templates_Controller_6_3';
Copy link
Member Author

Choose a reason for hiding this comment

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

LOL Gutenberg_REST_Templates_Controller_6_3 was way off 😮‍💨

Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

Code change looks good, and smoke tested that the global styles revisions still work correctly wherever they're exposed in the site editor (browse mode revisions button, revisions screen under global styles, etc)

LGTM! ✨

@ramonjd ramonjd merged commit b6986e0 into trunk Jun 14, 2023
@ramonjd ramonjd deleted the update/move-global-styles-revisions-endpoint-6-3 branch June 14, 2023 05:19
@github-actions github-actions bot added this to the Gutenberg 16.1 milestone Jun 14, 2023
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Jun 14, 2023
sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
* Removing `gutenberg_update_global_styles_rest_controller` hook as it's not required for 6.3 and was unrelated to the addition of the /revisions endpoint in the first place
Moving global styles revisions endpoint file to 6-3 since it'll be included in 6.3 and is not experimental

* Class needs to be named after file name, hence the 6_3 suffix

* Backporting changes from core to gutenberg: adding prepare_date_response to parse dates

* Tearing down after class in tests

* Post name should be different to the one created in the global styles endpoint test :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs User Documentation Needs new user documentation [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants