Repository navigation
Testing: Entity actions, fields, and view configs together - #14514
Closed
jorgefilipecosta wants to merge 7 commits into
Closed
jorgefilipecosta wants to merge 7 commits into
jorgefilipecosta wants to merge 7 commits into
Conversation
Copies the PHP of the `core-fields` package from the Gutenberg build and loads it, so WordPress registers its own fields through the entity fields API: the default fields every post type derives from its supports, and the field collections of pages, templates, template parts, patterns, attachments, navigation menus, and the site. Synced from WordPress/gutenberg#84696. See #66229.
Ports the REST controller tests of WordPress/gutenberg#84696: the fields route exposes the default fields of pages and the fields of patterns, with the script modules of their collections and the `core` origin. See #66229.
…udes them. The core fields are copied from the Gutenberg build, so their tests are skipped while the pinned build does not include them. See #66229.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
oandregal
reviewed
Oct 19, 2026
| }, | ||
| "gutenberg": { | ||
| "sha": "954fe7f9e04631c41aec4552acd627a7203a2aad", | ||
| "sha": "61ddc552e11d158d4043e4788a99c249a13b5fbb", |
Member
There was a problem hiding this comment.
Open a post in the post editor and verify the fields and the actions menu in the inspector. Verify in the Network panel that the editor made no request to /wp/v2/entity-actions or /wp/v2/entity-fields, which are preloaded.
For these instructions to work, the gutenberg sha should be e18c3cafbe1dc2f370fdc4cb7a44811766ea177c.
This was referenced Oct 19, 2026
Adds the view config of the `attachment` post type, whose form is the media editor form. It replaces the default post type form, so the media editor no longer shows only the date and author. Synced from WordPress/gutenberg#84700. See #66229.
Loads `register_core_entity_actions()` from the `core-actions` package, which registers the actions of posts, pages, patterns and template parts through the entity actions API at priority 0, so a plugin can unregister or replace them. The build copies its PHP files to `wp-includes/build/scripts/core-actions/`. The post editor also preloads the actions of the post type it edits. Synced from WordPress/gutenberg#84660. See #66343.
…ludes them. The core actions are copied from the Gutenberg build, so their tests are skipped while the pinned build does not include them. See #66343.
jorgefilipecosta
force-pushed
the
test/entity-actions-fields-view-config
branch
from
October 19, 2026 19:35
28404e6 to
57adf34
Compare
…ields, and view configs together. Points the Gutenberg pin to a trunk build that includes the core entity actions, fields, and view configs, with their labels in the default text domain, and adds the files that build copies over. For testing only, the pin update belongs to its own PR.
jorgefilipecosta
force-pushed
the
test/entity-actions-fields-view-config
branch
from
October 19, 2026 19:44
57adf34 to
c7aafe4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trac tickets: https://core.trac.wordpress.org/ticket/66343, https://core.trac.wordpress.org/ticket/65981
This PR combines three backport PRs and a Gutenberg pin update, so they can be tested together. It's for testing only, each piece is reviewed and committed in its own PR.
This PR:
attachmentview config, the form of the media editor.2a96cb241e138e39035c5afbc65ec1ff5e2f6cb0, a trunk build that includes Core Actions, Core Fields: Translate the labels with the default text domain gutenberg#85139, and adds the files it copies over, includingwp-includes/build/scripts/core-actions/andwp-includes/build/scripts/core-fields/.Some notes:
7b95ee9. #14497: that release doesn't include Core Actions: Register the core actions on the server gutenberg#84660, Core fields: Register the default fields of WordPress on the server gutenberg#84696 or Editor: Read the entity fields from the server gutenberg#84700, so the actions and fields scripts aren't built and the new code registers nothing._rest_cast_empty_objects_from_schema()torest-api.php. The entity fields endpoint uses it to return empty objects as{}rather than[], as does the view config endpoint. It landed in r64503, so it's already in trunk and in the three PRs; nothing else to apply.test_the_labels_are_translated_with_the_default_text_domainpasses in the entity actions and in the entity fields tests.Testing Instructions
npm run build:dev. The Gutenberg files are already committed.wp-admin/site-editor.php?p=%2Fpage. Verify the list shows the page fields and the actions menu of a page works: rename, trash, restore and permanently delete. Do the same in the templates and patterns screens./wp/v2/entity-actionsor/wp/v2/entity-fields, which are preloaded.wp-content/mu-plugins/. Verify "Copy title" and "Show details…" appear in the page list row menu, in the bulk bar (only "Copy title", which supports bulk) and in the post editor actions menu, and that both run.npm run test:php -- --group entity-fields,entity-actions,view-config. Verify they pass.Demo plugin:
demo-entity-actions.phpDemo plugin:
demo-entity-actions/actions.jsUse of AI Tools
AI assistance: Yes
Used for: combining the branches, staging the demo plugin, and drafting this description; reviewed and edited by me.
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.