Skip to content

Global styles revisions: add route for single styles revisions#5622

Closed
ramonjd wants to merge 4 commits intoWordPress:trunkfrom
ramonjd:add/global-styles-revisions-single-route
Closed

Global styles revisions: add route for single styles revisions#5622
ramonjd wants to merge 4 commits intoWordPress:trunkfrom
ramonjd:add/global-styles-revisions-single-route

Conversation

@ramonjd
Copy link
Copy Markdown
Member

@ramonjd ramonjd commented Nov 6, 2023

For awareness, some of these changes can be merged with this PR:

What?

Syncing Gutenberg PR:

Adding route for single global styles revisions: /wp/v2/global-styles/${ parentId }/revisions/${ revisionsId }

Why?

To make global styles revisions compatible with the proposed Core Data revisions API, that is, so that we can fetch single revisions via getRevision().

Trac ticket: https://core.trac.wordpress.org/ticket/59810


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@ramonjd ramonjd changed the title Add route for single global styles revisions and unit tests to boot Global styles revisions: add route for single styles revisions Nov 6, 2023
@youknowriad
Copy link
Copy Markdown
Contributor

@ramonjd Is it possible to add a unit test for this?

@getdave
Copy link
Copy Markdown
Contributor

getdave commented Jan 25, 2024

@ramonjd Is it possible to add a unit test for this?

I see unit tests in this PR.

npm run test:php -- --filter WP_REST_Global_Styles_Revisions_Controller_Test

OK (28 tests, 107 assertions)

What am I missing?

@youknowriad
Copy link
Copy Markdown
Contributor

What am I missing?

That my brain is confused with too many tabs maybe :P

You're right there are unit tests.

@ramonjd
Copy link
Copy Markdown
Member Author

ramonjd commented Jan 25, 2024

Thanks for double checking, folks!

@youknowriad
Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants