Repository navigation
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +153 B (0%) Total Size: 8.73 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
|
|
cc @verofasulo |
|
Makes sense to me! :) |
2deef01 to
4f20c19
Compare
… once A record without an id stands for several posts edited at once. The template field then offers every template of the post type, selects none until one is picked, and labels the default option generically; the parent field drops its self-exclusion. Both views show nothing until a value is picked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the template and parent fields to the fields bulk editing shows, in both site editors. Saving leaves the template of the front page and the posts page alone, as their template comes from the reading settings, and a selected page picked as the parent becomes the parent of the others. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4f20c19 to
9adfdb4
Compare
| const canSwitchTemplateOf = ( id: string ) => | ||
| String( id ) !== postsPageId && String( id ) !== frontPageId; | ||
| const canSwitchTemplate = postId.some( canSwitchTemplateOf ); |
There was a problem hiding this comment.
I'm uncomfortable with all this logic in the QuickEditModal (pre-existing to this PR). The goal is to have none. Fields should be standalone so that any third-party field can do the same things any core field does.
There was a problem hiding this comment.
Found more issues with existing bulk actions for status #87555
The template field is disabled for the front page and the posts page, whose template comes from the reading settings, and the parent field for a page that would be its own parent. A caller editing several posts at once can ask each post, instead of knowing about either field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quick edit modal no longer knows about the template and parent fields. Saving drops the edit of any field disabled for a post once edited, and editing several posts makes a field read-only when it is disabled for all of them. Both site editors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What?
Adds the Template and Parent fields to bulk editing in the site editor's Pages list, in both the site editor and the extensible site editor.
Why?
Selecting several pages and choosing "Bulk edit" only offered Status, Date, Author, and Discussion.
The fields are limited by a hardcoded allowlist (
fieldsWithBulkEditSupport), and Template and Parent were never on it, because both edit controls assumed a single post: the template control needs the post to work out its default template and whether it can switch, and the parent control uses the post's id to hide the post itself and its children from the options.How?
exclude/parent_excludewhen there is no id.packages/edit-siteandroutes/post-list):templateandparentjoinfieldsWithBulkEditSupport.The template field still doesn't appear for classic themes in bulk mode, the same as for a single page here: classic templates (
available_templates) come from the post editor's settings, which the site editor doesn't load.Testing Instructions
gutenberg-extensible-site-editorexperiment).Testing Instructions for Keyboard
Use of AI Tools
This PR was written with Claude Code (Claude Opus 5.5), which traced the bulk edit allowlist, implemented the changes, and drafted this description. I reviewed the changes and take responsibility for them.