Repository navigation
Conversation
🤖 PR meta 🤖📦 Bundle sizeSize Change: +267 B (0%) 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
|
Register the `edit-post` action of the site editor's pages list in the `page` collection, for the users who can edit pages, in the `list` context and first among the actions of pages. The action does not navigate by itself: its callback only calls `onActionPerformed` with the pages, so the screen listing it opens the editor from the `onActionPerformed` handler it passes to `usePostActions`. A list that does not handle it gets a no-op button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pages list now gets its Edit action from `usePostActions`, which loads the `edit-post` action of `@wordpress/core-actions`, and opens the editor from its `onActionPerformed` handler when that action is performed. The order of the actions is unchanged: in the list layout, Edit comes first as a primary action; in the other layouts, Edit and Quick edit come before the other actions. `useEditPostAction` stays in edit-site for the templates and patterns lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `edit-post` action of `@wordpress/core-actions` only signals it was performed and leaves the navigation to the list showing it. The lists of the extensible site editor open an item on click and do not handle the action, so the experiment unregisters it rather than showing a button that does nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and patterns Move the `edit-post` action from the `page` collection to `post_type_supports` and register it for the post types the lists of the site editor show: pages, templates, template parts, and patterns, when the user can edit them. It stays first among the actions of each post type. The action is not eligible for the patterns of the theme, which the patterns list shows along the patterns of the user but which cannot be edited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atterns The `edit-post` action of `@wordpress/core-actions` is now registered for templates, template parts, and patterns too. The lists of the extensible site editor open an item on click and do not handle the action, so the experiment unregisters it for those post types as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… patterns lists The templates, template parts, and patterns lists now get their Edit action from `usePostActions` and open the editor from the `onActionPerformed` handler they pass to it, like the pages list. The three lists share that handler, `useEditPostHandler`. `useEditPostAction` has no consumers left, so it is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the pages list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oandregal
force-pushed
the
try/core-actions-edit-post-on-action-performed
branch
from
October 23, 2026 11:37
87e2217 to
c48f7f4
Compare
Register the `edit-post` action for `wp_navigation`, when the user can edit navigation menus, so the navigation list of the extensible site editor can use it instead of its own. The action is primary for navigation menus only: clicking a menu in its list only previews it, so the list shows the action opening the editor as a button, like the action it replaces. The other post types keep it in the actions menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vigation list Replace the Edit action of the navigation list with the `edit-post` action of `@wordpress/core-actions`, which is registered for navigation menus and is primary for them. The list opens the editor from the `onActionPerformed` handler it passes to `usePostActions`. The route no longer uses `@wordpress/icons`, so it drops the dependency. 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.
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 a post is edited depends on the screen listing it, so neither action navigates by itself. Their callback only calls
onActionPerformedwith the items, and each list handles the action id in theonActionPerformedhandler it passes tousePostActions.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.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.context: 'list', so the post editor doesn't show them.useEditPostActionis replaced byuseEditPostHandler, which navigates to the editor onedit-post.useQuickEditPostActionis replaced byuseQuickEditPostHandler, which opens the quick edit form onquick-edit.edit-post, solib/experimental/extensible-site-editor.phpunregisters it for those four post types.onActionPerformedinstead of defining its own action.Testing Instructions
/wp/v2/entity-actionsfor pages: neitheredit-postnorquick-editis registered.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.