Repository navigation
Conversation
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. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: 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:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are blocking the editor summary placeholder changes.
No open issues 🎉
What changed in this PR
Updates editor summary panels to show placeholders for empty excerpt, description, and author fields, making their editability clearer. DataViews lists remain unchanged.
Changes:
- Enables
showPlaceholderIfEmptyfor the relevant default, pattern, template, and attachment form fields. - Adds PHPUnit coverage for placeholder configuration and updates the expected attachment form structure.
| File | Description |
|---|---|
tests/phpunit/tests/view-config.php |
Tests placeholder settings across supported forms and updates attachment expectations. |
src/wp-includes/view-config.php |
Enables placeholders for empty excerpt, description, and author panel fields. |
Review effort: Balanced
jorgefilipecosta
left a comment
There was a problem hiding this comment.
The changes look good to me 👍 Tests pass locally, and the REST endpoint returns the new layout for the forms that list the fields.
Turns on the panel layout's `showPlaceholderIfEmpty` option for the `excerpt` field in the default post type form and in the `wp_block` form, so an empty excerpt row shows "Add an excerpt" (or "Add a description" for patterns) instead of only its label. See #65981. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turns on the panel layout's `showPlaceholderIfEmpty` option for the `description` field in the `wp_template` form, so an empty description row shows the field's placeholder instead of only its label, like the excerpt of posts and patterns. See #65981. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turns on the panel layout's `showPlaceholderIfEmpty` option for the `author` field in the default post type form and in the `attachment` form, so a post or media item without a known author shows the field's placeholder instead of only its label, as the post summary did before it moved to the form. See #65981. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…holders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r tests. `WP_UnitTestCase_Base::set_up()` already resets post types before each test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1476d54 to
215e5f4
Compare
Trac ticket: https://core.trac.wordpress.org/ticket/65981
Turns on the panel layout's
showPlaceholderIfEmptyoption inview-config.phpfor the fields that render nothing when empty, so their row in the editor's summary panel shows the field's placeholder instead of only its label, which gave users no hint the row can be edited until they hovered it:excerpt, in the default post type form and in thewp_blockform: "(No excerpt)", or "(No description)" for patterns.description, in thewp_templateform: "(No description)".author, in the default post type form and in theattachmentform: "(No author)", for a post or media item without a known author, as the post summary did before it moved to the form.DataViews lists are not affected, since the placeholder only shows in the panel summary.
The REST schema of the endpoint already allows
showPlaceholderIfEmpty. The muted styling of the placeholder and the new placeholder strings ship with the@wordpress/dataviewsand@wordpress/core-fieldspackage updates.Backports
Gutenberg PRs:
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 5.5
Used for: Porting the change and its tests from the Gutenberg PR. 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.