Repository navigation
Core Actions: Move the Edit and Quick edit actions of the site editor lists (entity navigator) - #85291
Draft
oandregal wants to merge 14 commits into
Draft
Core Actions: Move the Edit and Quick edit actions of the site editor lists (entity navigator)#85291oandregal wants to merge 14 commits into
oandregal wants to merge 14 commits into
Conversation
🤖 PR meta 🤖📦 Bundle sizeSize Change: +792 B (+0.01%) Total Size: 9.07 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome 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. Regression: updating a specific option will only change its value and will not corrupt others in
|
Add the `setEntityNavigator` private action and the `getEntityNavigator`
private selector to the editor store. The screen sets, once, the function
opening an entity for editing the way it does, `( { postType, postId } )
=> void`, and the actions opening an entity read it from the registry
DataViews passes to their callbacks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Register the `edit-post` action of the `page` collection for pages, first, when the user can edit them. Its data (label, `context: 'list'`) is in `action.php`; its callback opens the page with the entity navigator the screen sets in the editor store, and does nothing when the screen sets none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set the entity navigator of the site editor once, inside the router: it navigates to the entity with the canvas in edit mode. The pages list then uses the `edit-post` action the server registers instead of the one of `useEditPostAction`, which templates and patterns keep using, in the same place: first and primary in the list layout, before "Quick edit" otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `edit-post` action opens a page with the entity navigator the screen sets in the editor store, which the extensible site editor does not set: its lists open a page when it is clicked. Unregister the action while the experiment is enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d patterns Move the `edit-post` action from the `page` collection to the `post_type_supports` one, and register it, first, for pages, templates, template parts, and patterns, when the user can edit them. It opens the entity with the entity navigator the screen sets, so the site editor lists can use it instead of the one of `useEditPostAction`. It is not offered for the patterns of the theme, which are not entity records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atterns Core now registers the `edit-post` action for templates, template parts, and patterns too. The extensible site editor sets no entity navigator, so it unregisters the action for those post types as well, not only for pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The templates list uses the `edit-post` action the server registers, first, instead of the one of `useEditPostAction`. It opens the template with the entity navigator the app sets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The patterns and template parts lists use the `edit-post` action the server registers, first, instead of the one of `useEditPostAction`. It is not offered for the patterns of the theme, which cannot be edited. With no list using it anymore, remove `useEditPostAction`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…form
Add the `setQuickEditOpener` private action and the `getQuickEditOpener`
private selector to the editor store. The screen listing the entities sets
the function opening their quick edit form the way it does,
`( { postType, postIds } ) => void`, and the "Quick edit" action reads it from
the registry DataViews passes to its callback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Register the `quick-edit` action of the `page` collection for pages, after the Edit action, when the user can edit them. Its data (label, `context: 'list'`, primary, bulk) is in `action.php`; its script parts label it "Bulk edit" for several pages, and its callback opens the quick edit form with the opener the screen sets in the editor store. It does nothing when the screen sets none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pages list sets the quick edit opener while it is mounted: it adds the pages to the URL, which shows the quick edit form. It then uses the `quick-edit` action the server registers instead of the one of `useQuickEditPostAction`, in the same place: after "Edit" outside the list layout, and not in the list layout, which shows the page instead. With no list using it anymore, remove `useQuickEditPostAction`, the last hook of `dataviews-actions`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The posts list of the extensible site editor sets the quick edit opener while it is mounted, and uses the `quick-edit` action the server registers instead of its own, in the same place: first, and not in the list layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oandregal
force-pushed
the
try/core-actions-edit-post-registry
branch
from
October 23, 2026 11:40
190cfb6 to
43453fb
Compare
Register the `edit-post` action for `wp_navigation` too, for the users who can edit navigation menus. Like for the other post types, it opens the menu with the entity navigator the screen sets in the editor store. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vigation list Replace the route's own Edit action of navigation menus with the one of `@wordpress/core-actions`. The list sets the entity navigator the action opens a menu with, and shows the action as a button, since clicking a menu only previews it. The experiment keeps the action of navigation menus registered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
What?
Follow up to #84932. Alternative to #85290.
Moves the "Edit" and "Quick edit" actions of the site editor lists from
@wordpress/edit-siteto@wordpress/core-actions, so the server registers them through the entity actions API like the other core actions.Why?
The lists of pages, templates, template parts, and patterns built these two actions by hand (
useEditPostActionanduseQuickEditPostAction) and prepended them to the actions ofusePostActions. As a result, plugins couldn't see, unregister, or replace them, and the extensible site editor had its own copy of Quick edit.How?
How an entity is opened depends on the screen showing it, so the actions don't navigate by themselves. Instead, the screen sets a function in the editor store, and the callback of each action reads it from the
registryDataViews passes to it. This differs from #85290, where each list handles the action ids in itsonActionPerformedhandler.setEntityNavigator/getEntityNavigator:( { postType, postId } ) => void, opens an entity for editing.setQuickEditOpener/getQuickEditOpener:( { postType, postIds } ) => void, opens the quick edit form.edit-post(inpost_type_supports) is registered for pages, templates, template parts, and patterns when the user can edit them. It is not eligible for trashed items or theme patterns. Its callback calls the entity navigator.quick-edit(inpage) is registered for pages when the user can edit them, right afteredit-post. Its label switches between "Quick edit" and "Bulk edit", and it supports bulk. Its callback calls the quick edit opener.context: 'list', so the post editor doesn't show them. On a screen that sets no function, they do nothing.useEditPostAction,useQuickEditPostAction, and thedataviews-actionsfolder are removed. The pages list keeps its ordering. In the list layout, Quick edit is dropped and Edit is primary.lib/experimental/extensible-site-editor.phpunregistersedit-postfor those four post types.quick-editaction instead of defining its own.Testing Instructions
/wp/v2/entity-actionsfor pages: neitheredit-postnorquick-editis registered.Testing Instructions for Keyboard
The actions are the same DataViews actions as before, in the same menus: open the actions menu of an item with the keyboard, and use Edit and Quick edit with Enter.
Screenshots or screencast
Site editor (v1), with this branch:
Use of AI Tools
This PR was authored with Claude Code (Claude Opus 5.5): code, tests, this description, and the screenshots. I reviewed the changes.