Skip to content

Post summary: Show placeholders for an empty excerpt and a missing author - #85842

Merged
oandregal merged 20 commits into
trunkfrom
update/excerpt-empty-state
Nov 4, 2026
Merged

oandregal merged 20 commits into
trunkfrom
update/excerpt-empty-state

Conversation

@oandregal

@oandregal oandregal commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

What?

See #76076 (comment) (part of #76076)

Two rows of the post summary no longer render as a bare label when their value is empty:

  • Excerpt: an empty excerpt shows a muted "(Add an excerpt)" placeholder (patterns show "Add a description"), so the row no longer reads as a label with nothing to act on.
  • Author: a post without an author (id 0), or whose author id matches no user listed as an author (like a deleted user), shows "(No author)", as the post summary did before it moved to the form.

When empty

Before After
Post summary on trunk: the empty Excerpt row shows only its label, and the Author row only an icon Post summary on this branch: the Excerpt row shows (No excerpt) and the Author row shows (No author)

When not empty

Before After
Post summary on trunk with an excerpt and an author: the excerpt renders in regular weight Post summary on this branch with an excerpt and an author: the excerpt renders with the emphasized weight of other values

Why?

Since #82423, the excerpt field renders nothing when empty, which is right for DataViews lists, where fields aren't editable. In the panel row, though, that leaves only the "Excerpt" label, and the edit button only appears on hover or focus. The call-for-testing feedback linked above points out that in a still view, roughly what a keyboard or low-vision user sees before hovering, nothing tells you the row is editable.

The author row has the same problem, and it's a regression: the post summary showed "(No author)" for a post without an author before it moved to the form, and the author field now renders nothing for it.

Options considered for the excerpt

Option Screenshot
Always show the edit button for the excerpt row (editVisibility: 'always')

Committed in 3fac020 and reverted in 1b6fa7f, kept in the history in case we want to reuse it. I'm not convinced this is the way forward, but it's a possibility we have and wanted to share.
Empty Excerpt row with only its label and an always visible edit button
Show the field's placeholder when empty (this PR)

The placeholder is muted by color and turns to the brand color on row hover, like the label. It keeps the emphasized weight of values, which is what tells it apart from the label in forced colors mode, and the parentheses mark it as standing in for a value, like "(No author)".
Post summary on this branch: the Excerpt row shows (No excerpt) and the Author row shows (No author)
Render the excerpt inline with the regular layout

Explored in #82444 (closed). Needs its own design exploration, see #76076 (comment).
—
Use a realistic example value as the placeholder

Suggested in #82423 (comment). "Add an excerpt" is a call to action rather than an example value.
—

How?

  • packages/dataviews:
    • The panel placeholder is muted by color, keeps the emphasized weight of values, and takes the brand color on row hover.
    • showPlaceholderIfEmpty also shows the placeholder when the field's render output is empty, not only its value. A value can render nothing, like an id matching no record, which the field may only learn after fetching it. The panel renders the value followed by the placeholder, and CSS shows the placeholder only while the value's wrapper is :empty.
  • packages/core-fields:
    • Excerpt: the placeholder becomes "(Add an excerpt)", and the value renders in a plain span instead of Text of @wordpress/ui, so it takes the emphasized weight of other values in the panel.
    • Author: the field gets "(No author)" as its placeholder, and its view renders nothing for an author id matching no user once the lookup has finished.
  • lib/compat/wordpress-7.2/view-config-api.php: 7.2 layers merge showPlaceholderIfEmpty: true into the excerpt and author members of the form, by id, so the rest of their 7.1 layout stays as is. They're registered for every post type using the default form (including custom post types), and the excerpt one for patterns too. Post types with their own form that doesn't list the field are skipped, since merge() would append the member there.
  • Tests: PHPUnit tests cover the excerpt and author layouts for the post types using the default form, and check the members aren't appended to the other forms. A DataForm unit test covers the empty render output. The post summary e2e test now expects the placeholder in the empty excerpt row.

Testing Instructions

Excerpt

  1. Open a new post and the Post tab in the sidebar.
  2. The Excerpt row shows "(Add an excerpt)" in a muted color.
  3. Hover the row: the label and the placeholder turn to the brand color, and the edit button shows.
  4. Add an excerpt from the row and check it replaces the placeholder, with the same weight as other values.
  5. Open a pattern: the Description row shows "Add a description" when empty.

Author

  1. Create a post, and set its author to an id with no user: npm run wp-env run cli -- wp post update <id> --post_author=9999.
  2. Open the post: the Author row shows "(No author)" instead of only its label.
  3. Repeat with --post_author=0: the row shows the same placeholder.
  4. Pick an author from the row and check it replaces the placeholder.

Testing Instructions for Keyboard

  1. Tab through the Post tab of the sidebar until the Excerpt edit button is focused.
  2. Press Enter to open the editor, type an excerpt, and press Escape.
  3. The row shows the excerpt instead of the placeholder.

Use of AI Tools

Claude Code (Claude Opus 5.5) wrote the code, tests and this description; I reviewed them and chose between the options.

@oandregal oandregal added the [Type] Enhancement A suggestion for improvement. label Oct 28, 2026
Copilot AI balanced review requested due to automatic review settings October 28, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions github-actions Bot added the [Package] DataViews /packages/dataviews label Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: oandregal <oandregal@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: -3.05 kB (-0.04%)

Total Size: 8.58 MB

📦 View Changed
Filename Size Change
build/modules/core-fields/attachment.min.js 39.3 kB +7 B (+0.02%)
build/modules/core-fields/post_type_supports.min.js 73.4 kB +60 B (+0.08%)
build/modules/core-fields/wp_block.min.js 33 kB -1.63 kB (-4.71%) ✅
build/modules/core-fields/wp_template.min.js 5.55 kB -1.86 kB (-25.08%) 🎉
build/scripts/block-editor/index.min.js 542 kB +22 B (0%)
build/scripts/edit-site/index.min.js 377 kB +36 B (+0.01%)
build/scripts/editor/index.min.js 559 kB +41 B (+0.01%)
build/styles/edit-site/style-rtl.css 20.5 kB +33 B (+0.16%)
build/styles/edit-site/style-rtl.min.css 16.6 kB +29 B (+0.17%)
build/styles/edit-site/style.css 20.6 kB +32 B (+0.16%)
build/styles/edit-site/style.min.css 16.6 kB +29 B (+0.17%)
build/styles/editor/style-rtl.css 30.6 kB +37 B (+0.12%)
build/styles/editor/style-rtl.min.css 26.3 kB +35 B (+0.13%)
build/styles/editor/style.css 30.7 kB +47 B (+0.15%)
build/styles/editor/style.min.css 26.3 kB +35 B (+0.13%)

3cee79d Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric fb6cc16 trunk % Change
timeToFirstByte 45.3 ms +3.53% -4.97% 47.6 ms +11.76% -8.72% -4.83%
largestContentfulPaint 76 ms +5.26% -2.63% 82 ms +4.88% -12.2% -7.32%
lcpMinusTtfb 29.55 ms +14.38% -1.52% 29.25 ms +22.74% -8.21% 1.03%
wpBeforeTemplate 23.29 ms +8.42% -3.48% 24.18 ms +17.99% -6.58% -3.68%
wpTemplate 18.43 ms +5.75% -7.7% 19.18 ms +3.02% -8.86% -3.91%
wpTotal 42.01 ms +3.5% -5.31% 44.04 ms +11.78% -9.11% -4.61%
wpMemoryUsage 7.72 MB +0% -0% 7.67 MB +0% -0% 0.58%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric fb6cc16 trunk % Change
timeToFirstByte 34.5 ms +4.35% -5.07% 37.6 ms +5.32% -1.99% -8.24%
largestContentfulPaint 74 ms +2.7% -2.7% 84 ms +0% -4.76% -11.9%
lcpMinusTtfb 39.65 ms +2.77% -1.26% 45.05 ms +2.22% -3.66% -11.99%
wpBeforeTemplate 20.06 ms +3.04% -2.89% 20.22 ms +5.93% -1.34% -0.79%
wpTemplate 10.98 ms +11.38% -6.74% 14.32 ms +2.44% -3.63% -23.32%
wpTotal 31.93 ms +4.29% -5.79% 34.47 ms +7.11% -1.36% -7.37%
wpMemoryUsage 6.30 MB +0% -0% 6.36 MB +0% -0% -1.04%
wpDbQueries 9 +0% -0% 13 +0% -0% -30.77%

media-processing

Metric fb6cc16 trunk % Change
mediaProcessingJpeg 332.23 ms +0.77% -0.86% 328.57 ms +0.37% -0.24% 1.11%
mediaProcessingAvif 4913.39 ms +0.22% -0.29% 4850.55 ms +0.37% -0.27% 1.3%
mediaProcessingJpegToAvif 3427.23 ms +0.29% -0.29% 3398.17 ms +0.45% -0.11% 0.86%

media-upload

Metric fb6cc16 trunk % Change
jpegUploadProcessing 1460.36 ms +1.86% -1.49% 1437.95 ms +0.38% -0.41% 1.56%
pngUploadProcessing 228.34 ms +1.11% -9.27% 232.49 ms +1.27% -24.04% -1.79%
largeJpegUploadProcessing 1419.72 ms +0.15% -0.42% 1424.02 ms +0.42% -0.3% -0.3%
multipleImageUploadProcessing 1494.33 ms +0.9% -0.5% 1517.71 ms +1.33% -0.37% -1.54%

post-editor

Metric fb6cc16 trunk % Change
serverResponse 407.01 ms +0.54% -1.48% 407.24 ms +2.72% -6.99% -0.06%
firstPaint 323.19 ms +17.54% -7.75% 371.37 ms +31.51% -10.7% -12.97%
domContentLoaded 827.75 ms +0.95% -1.01% 859.24 ms +2.56% -1.43% -3.66%
loaded 828.92 ms +0.92% -1.01% 860.17 ms +2.59% -1.41% -3.63%
firstContentfulPaint 476.24 ms +0.95% -0.76% 495.25 ms +5.31% -2.14% -3.84%
firstBlock 2055.21 ms +1.35% -0.88% 2139.27 ms +0.4% -2.8% -3.93%
type 18.29 ms +6.83% -14.87% 17.64 ms +6.69% -6.92% 3.68%
typeWithoutInspector 17.57 ms +9.33% -5.69% 17.54 ms +12.09% -5.59% 0.17%
typeWithTopToolbar 23.89 ms +7.07% -10.88% 24.27 ms +6.55% -8.41% -1.57%
typeContainer 7.89 ms +9.38% -6.46% 8.33 ms +10.56% -5.04% -5.28%
focus 119.44 ms +7.45% -6.66% 118.85 ms +7.1% -2.8% 0.5%
firstFocus 251.35 ms +0% -0% 260.82 ms +0% -0% -3.63%
selectAll 350.02 ms +1.19% -0.67% 352.92 ms +19.66% -1.86% -0.82%
undo 30.74 ms +9.99% -4.52% 32.01 ms +5.12% -5.34% -3.97%
listViewOpen 76.1 ms +10.09% -7.6% 73.31 ms +4.2% -3.64% 3.81%
inserterOpen 44.58 ms +6.21% -7.96% 43.62 ms +8.92% -11.88% 2.2%
inserterHover 12.13 ms +17.72% -10.96% 12.44 ms +4.1% -14.63% -2.49%
inserterSearch 9.25 ms +5.19% -4.65% 9.59 ms +4.17% -10.95% -3.55%
loadPatterns 697.78 ms +4.14% -2.34% 702.75 ms +3.83% -1.42% -0.71%
wpTotal 397.65 ms +0.55% -1.54% 397.63 ms +2.58% -7.08% 0.01%
wpMemoryUsage 14.76 MB +0% -0% 14.72 MB +0% -0% 0.32%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric fb6cc16 trunk % Change
serverResponse 473.39 ms +1.52% -7.73% 473.03 ms +0.42% -4.1% 0.08%
firstPaint 339.79 ms +21.14% -3.96% 364.5 ms +4.83% -19.44% -6.78%
domContentLoaded 882.36 ms +5.53% -3.39% 843.9 ms +2.88% -0.41% 4.56%
loaded 883.67 ms +5.48% -3.42% 844.76 ms +2.89% -0.39% 4.61%
firstContentfulPaint 504.98 ms +4.97% -1.89% 487.02 ms +1.35% -1.64% 3.69%
firstBlock 2594.94 ms +3.83% -0.76% 2506.3 ms +0.38% -1.45% 3.54%
type 19.42 ms +2.99% -8.91% 17.41 ms +4.6% -4.54% 11.55%
navigate 113.39 ms +12.96% -1.6% 114.77 ms +14.61% -9.87% -1.2%
loadPatterns 1339.81 ms +7.63% -18.7% 1248.12 ms +7.84% -14.56% 7.35%
loadPages 977.95 ms +1.43% -2.65% 992.23 ms +5.61% -3.27% -1.44%
wpTotal 463.9 ms +1.54% -7.9% 463.54 ms +0.44% -4.15% 0.08%
wpMemoryUsage 12.78 MB +0% -0% 12.73 MB +0% -0% 0.36%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

3cee79d Run

🏁 Flaky tests

Some 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.

Page List converts to Navigation Links with entity bindings in /test/e2e/specs/editor/blocks/navigation.spec.js, passed after 1 failed attempt.
Error: expect(locator).toContainText(expected) failed

Locator: getByRole('region', { name: 'Editor settings' }).getByRole('tabpanel', { name: 'Content' }).getByRole('button', { name: /Link to:/ })
Expected substring: "test-page-1"
Received string:    "Link to:Cat/catPagePublished"
Timeout: 5000ms

Call log:
  - Expect "toContainText" getByRole('region', { name: 'Editor settings' }).getByRole('tabpanel', { name: 'Content' }).getByRole('button', { name: /Link to:/ }) with timeout 5000ms
  - waiting for getByRole('region', { name: 'Editor settings' }).getByRole('tabpanel', { name: 'Content' }).getByRole('button', { name: /Link to:/ })
    14 × locator resolved to <button type="button" aria-expanded="false" aria-haspopup="dialog" class="components-button link-preview-button is-next-40px-default-size is-secondary">…</button>
       - unexpected value "Link to:Cat/catPagePublished"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/navigation.spec.js:1949:31
Undo restores the post selection when another synced entity is loaded (RTC WebSocket) in /test/e2e/specs/editor/collaboration/collaboration-undo-redo.spec.ts, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

  Object {
    "attributeKey": "content",
    "blockIndex": 0,
    "content": "abcdef",
-   "endOffset": 3,
-   "offset": 3,
+   "endOffset": 6,
+   "offset": 6,
  }

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/collaboration-undo-redo.spec.ts:363:5
should hide UI when selection changes (by mouse) in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js, passed after 2 failed attempts.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → DELETE http://localhost:8889/wp-json/wp/v2/users/25?force=true&reassign=1
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: 8b6009906b
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1793897528%7CEKMf1cEymDBVWCnXjuPHVJEt4OlByMicfVrieEZfhXe%7C681769606ad38ad60dff254e7a5e12f427814bb606042d40cae024429181a011; wp-settings-time-1=1793725378

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:111:39)
    at RequestUtils.deleteUser (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/users.ts:91:30)
    at map (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/users.ts:116:51)
    at RequestUtils.deleteAllUsers (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/users.ts:116:5)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js:73:3

should select by dragging into separator in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toEqual(expected) // deep equality

- Expected  - 1
+ Received  + 0

  Array [
    1,
-   2,
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:2182:5
should show format toolbar when selecting text from the left edge of a block in /test/e2e/specs/editor/various/writing-flow.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeVisible() failed

Locator: getByRole('toolbar', { name: 'Block tools' }).getByRole('button', { name: 'Bold' })
Expected: visible
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeVisible" getByRole('toolbar', { name: 'Block tools' }).getByRole('button', { name: 'Bold' }) with timeout 5000ms
  - waiting for getByRole('toolbar', { name: 'Block tools' }).getByRole('button', { name: 'Bold' })

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/writing-flow.spec.js:1532:5

3cee79d Run

@oandregal

Copy link
Copy Markdown
Member Author

cc @verofasulo

@mirka mirka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also hit this issue in an audit, and the Author field also has this problem, where it used to show "(No author)" in 7.1. Now it's just blank.

In case there's room to rethink the design, I'll note that the interactivity affordance is still a bit weak on touch devices where there's no hover cue.

We should also check in force colors mode. Bold text is now a design system cue for interactivity, but normal-weight placeholder text wouldn't be sufficient.

Post inspector in forced colors mode

@oandregal oandregal changed the title Post summary: Show a muted placeholder for an empty excerpt Post summary: Show placeholders for an empty excerpt and a missing author Oct 30, 2026
@oandregal

Copy link
Copy Markdown
Member Author

I've made a few changes to address Lena's and the original reviewer's comments. This is how it looks now. The diff with respect to trunk is:

  • There are placeholders for empty content in excerpt and author. They are different than fields two ways:
    • they have a parenthesis (convention), which helps addressing the force colors mode
    • their color is different from fields, but the weight is the same
  • I also changed the text for excerpt to (No excerpt) instead of the existing Add an excerpt that was a CTA. I suppose either we use one approach or the other for all fields to help user orientation.
  • When not empty, the excerpt field uses the same weight as any other field. I figured the comments for force colors mode also apply to this state.
  • There's a few cases in which an author can be considered empty and this consolidates them all (previously it was either empty field or default avatar but empty text name):
    • Author removed or not found (ID 0 or with ID but no longer exists).
    • When the author is still an existing user but no longer has edit capabilities. I've left this as it was in 7.1 (displays "(No author)") but wanted to note that we treat this differently in the site editor where we do display the original author, even though you can't pick it. The author data fetching works differently in both screens. We could made the inspector work this way but I prioritized making it work as 7.1 for now.

When empty

Before After
Post summary on trunk: the empty Excerpt row shows only its label, and the Author row only an icon Post summary on this branch: the Excerpt row shows (No excerpt) and the Author row shows (No author)

When not empty

Before After
Post summary on trunk with an excerpt and an author: the excerpt renders in regular weight Post summary on this branch with an excerpt and an author: the excerpt renders with the emphasized weight of other values

@oandregal
oandregal force-pushed the update/excerpt-empty-state branch from 6cadd21 to 5ca9b42 Compare October 30, 2026 10:41
@github-actions github-actions Bot added the [Package] Fields /packages/fields label Oct 30, 2026
typeof item.excerpt === 'string' ? item.excerpt : item.excerpt?.raw;
return excerpt ? (
<Text className={ styles.excerpt }>
<span className={ styles.excerpt }>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing from Text to span so that the field has the same weight as any other field.

&:not(:empty) + .dataforms-layouts-panel__field-placeholder {
display: none;
}
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is connected with the changes in summary-button.jsx so that we can display the placeholder when the field has tried fetching data but still returns nothing (e.g., author field that didn't found the author).

I tried alternatives such as moving the decision to the field render: this is unsatisfactory because we only want the placeholder when in the panel mode and only if the showPlaceholderIfEmpty form prop is enabled. The field must remain view/form agnostic.

@oandregal oandregal added the Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 30, 2026
Comment thread backport-changelog/7.2/15120.md Resolved
oandregal and others added 3 commits November 3, 2026 17:21
An empty excerpt row showed only its label, with nothing telling users the row is editable until they hover it. Turn on the panel layout's `showPlaceholderIfEmpty` for the excerpt, so the row reads "Add an excerpt" (or "Add a description" for patterns). The field's `render` still returns nothing, so DataViews lists stay empty.

The setting is a 7.2 layer that merges into the `excerpt` member of the post types whose form lists it: those using the default form, and patterns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The excerpt row's edit button only appeared on hover or focus, so in a still view nothing showed the row could be edited. Set the panel layout's `editVisibility` to `always` in the 7.2 layer for the excerpt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The placeholder that `showPlaceholderIfEmpty` shows had no styles, so it inherited the bold of the panel values and read as a value itself. Give it the default weight and the muted color of the labels, turning to the brand color on row hover like the label does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oandregal and others added 12 commits November 3, 2026 17:23
Layers `showPlaceholderIfEmpty` onto the `author` member of the default
post type form, as for the excerpt. Post types providing their own form
are skipped, since the patch would append the member there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In forced colors mode the muted color of the placeholder is replaced by the system text color, so a normal-weight placeholder looked like the label next to it, and the row no longer read as editable. Keep the emphasized weight of values, the design system cue for interactivity, and mute the placeholder by color only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Now that the placeholder shares the weight of values, the parentheses mark it as standing in for an empty excerpt, like "(No author)".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The excerpt rendered through `Text` of `@wordpress/ui`, which sets its own font weight, so in a panel row it was not emphasized like the values of other fields. Render it in a plain `span`, keeping the three-line clamp, so it takes the typography of where it renders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pattern and template descriptions now use "(No description)", like the "(No excerpt)" and "(No author)" placeholders, so all of them read as standing in for an empty value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pattern and template descriptions rendered through `Text` of `@wordpress/ui`, which sets its own font weight, so in a panel row they were not emphasized like the excerpt and the values of other fields. Render them in a plain `span`, so they take the typography of where they render.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mpty

The description row of a template showed only its label when the description was empty, while the excerpt row of posts and patterns shows "(No excerpt)". Turn on `showPlaceholderIfEmpty` for it, so an empty description shows "(No description)". The row only appears for templates created by users, so theme and plugin templates are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thor

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as no author

The attachment form lists the `author` field at its top level too, so the
author layout patch merges into it like it does for the default form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oandregal
oandregal force-pushed the update/excerpt-empty-state branch from 05ebe4b to 3cee79d Compare November 3, 2026 16:45

@jorgefilipecosta jorgefilipecosta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things tested well on my wp-env and the code looks good 👍 I checked the post editor, the media editor, and patterns, and the placeholders show for an empty excerpt, an empty description, and a missing author, including media without an author. The unit, PHPUnit, and e2e tests also pass locally.

The failed e2e job broke during the environment setup before any test ran, so I think a re-run should make it green. I guess we should also add the author and description layouts to WordPress/wordpress-develop#15120 so the core backport matches this PR.

@oandregal
oandregal merged commit 4e7829d into trunk Nov 4, 2026
114 of 116 checks passed
@oandregal
oandregal deleted the update/excerpt-empty-state branch November 4, 2026 11:04
@github-actions github-actions Bot added this to the Gutenberg 24.5 milestone Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

There was a conflict while trying to cherry-pick the commit to the wp/7.2 branch. Please resolve the conflict manually and create a PR to the wp/7.2 branch.

PRs to wp/7.2 are similar to PRs to trunk, but you should base your PR on the wp/7.2 branch instead of trunk.

# Checkout the wp/7.2 branch instead of trunk.
git checkout wp/7.2

# Create a new branch for your PR.
git checkout -b my-branch

# Cherry-pick the commit.
git cherry-pick 4e7829df36b0b08c34d5919d4ee014652930f4eb

# Check which files have conflicts.
git status

# Resolve the conflict...
# Add the resolved files to the staging area.
git status
git add .
git cherry-pick --continue

# Push the branch to the repository
git push origin my-branch

# Create a PR and set the base to the wp/7.2 branch.
# See https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request.

@oandregal

Copy link
Copy Markdown
Member Author

Manual backport at #86294

oandregal added a commit that referenced this pull request Nov 4, 2026
…thor (#85842) (#86294)

Co-authored-by: oandregal <oandregal@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
wporg-sync pushed a commit to WordPress/wordpress-develop that referenced this pull request Nov 5, 2026
…r fields.

Turns on the panel layout's `showPlaceholderIfEmpty` option in `view-config.php` for 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 could be edited until they hovered it:

- `excerpt`, in the default post type form and in the `wp_block` form.
- `description`, in the `wp_template` form.
- `author`, in the default post type form and in the `attachment` form, 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.

Backports the changes from WordPress/gutenberg#85842.

Props oandregal, jorgefilipecosta, 0mirka00.
Fixes #65981.


git-svn-id: https://develop.svn.wordpress.org/trunk@65273 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Nov 5, 2026
…r fields.

Turns on the panel layout's `showPlaceholderIfEmpty` option in `view-config.php` for 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 could be edited until they hovered it:

- `excerpt`, in the default post type form and in the `wp_block` form.
- `description`, in the `wp_template` form.
- `author`, in the default post type form and in the `attachment` form, 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.

Backports the changes from WordPress/gutenberg#85842.

Props oandregal, jorgefilipecosta, 0mirka00.
Fixes #65981.

Built from https://develop.svn.wordpress.org/trunk@65273


git-svn-id: http://core.svn.wordpress.org/trunk@64422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@t-hamano t-hamano added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Nov 5, 2026
wporg-sync pushed a commit to WordPress/wordpress-develop that referenced this pull request Nov 10, 2026
This updates the pinned commit hash of the Gutenberg repository from `c035c1a649ef68f5c1646694cf440df1d7ae6e62` to `1b0dc90c700746b108e080263a4dc67707b750a1` (fixes cherry-picked to the `wp/7.2` branch).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@c035c1a...1b0dc90

- [WP 7.2] Components, UI: Use focus-visible for disabled item focus rings (WordPress/gutenberg#86269)
- Notes: Keep the canvas still when a new note is added (WordPress/gutenberg#86283) (#86293)
- Post summary: Show placeholders for an empty excerpt and a missing author (WordPress/gutenberg#85842) (#86294)
- Core fields: Restore the previous Publish and Status panel date behaviour (WordPress/gutenberg#86065) (#86295)
- Interactivity API: Show the data-wp-html fallback on created elements under Trusted Types (WordPress/gutenberg#84924) (#86306)
- [WP 7.2] UI: Add LoadingIndicator to item popups (WordPress/gutenberg#86303)
- Interactivity Router: Fix nested router regions without data-wp-interactive disappearing on navigation (WordPress/gutenberg#86061) (#86308)
- Interactivity API: Run watch() cleanups and attachTo render callbacks without a directive scope (WordPress/gutenberg#86058) (#86311)
- DataForm: Fix clipped focus ring of field values in panel layout (WordPress/gutenberg#86361) (#86369)
- Tests: Avoid passing an object when invoking static methods via reflection. (WordPress/gutenberg#86329)
- [WP 7.2] DropdownMenu: Invert the selected item indicator while highlighted (WordPress/gutenberg#86379)
- Fields: Lowercase the (no excerpt), (no author) and (no description) placeholders (WordPress/gutenberg#86391) (#86424)
- Core fields: Decode non-Latin slugs in the slug field (WordPress/gutenberg#86359)
- Interactivity API: Show the new page's server content in kept data-wp-html elements (WordPress/gutenberg#86416)
- DataForm: Tighten value density in the panel layout (WordPress/gutenberg#86389) (#86426)
- Post summary: Show "Immediately" and relative publish dates in the Date row (WordPress/gutenberg#86367)
- [WP 7.2] Block Styles: Show the active style variation in forced colors mode (WordPress/gutenberg#86450)
- Site Editor: Fix the frame snapping to the mobile width when resized with the mouse (WordPress/gutenberg#86423)
- Image: measure the lightbox container, not the image's parent (WordPress/gutenberg#82312) (#85491)
- URL: Decode percent-encoded characters in getFilename (WordPress/gutenberg#86422) (#86477)
- Fix: Hide the author avatar when the site does not show avatars and frame a blank one. (WordPress/gutenberg#86395)
- Date picker: Mark the posts of the month a typed or reset date moves to (WordPress/gutenberg#86298) (#86463)
- Fix iOS 27 tap into a heading leaving the caret in a quote (WordPress/gutenberg#85809)
- Hand focus back to the field on a press in every browser (WordPress/gutenberg#86549)
- Prevent jobs from running within forks on `push`. (WordPress/gutenberg#85968)
- i18n: Add translator context to the "Copy error" button label (WordPress/gutenberg#85967)
- Bubble editor canvas events to the outer iframe (WordPress/gutenberg#85263)
- UI: Use LoadingIndicator in remaining popup consumers (WordPress/gutenberg#86501)
- Block Editor: Keep the revision canvas read-only in preview mode (WordPress/gutenberg#84578)
- Core Data: Rank an exact title match first among tied link suggestions (WordPress/gutenberg#86327)
- Tests: Render the router-html-server context case through state (WordPress/gutenberg#86511)
- iOS tests: De-flake the selection handle test (WordPress/gutenberg#85461)

Props mamaduka, wildworks.
See #66340.

git-svn-id: https://develop.svn.wordpress.org/trunk@65379 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Nov 10, 2026
This updates the pinned commit hash of the Gutenberg repository from `c035c1a649ef68f5c1646694cf440df1d7ae6e62` to `1b0dc90c700746b108e080263a4dc67707b750a1` (fixes cherry-picked to the `wp/7.2` branch).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@c035c1a...1b0dc90

- [WP 7.2] Components, UI: Use focus-visible for disabled item focus rings (WordPress/gutenberg#86269)
- Notes: Keep the canvas still when a new note is added (WordPress/gutenberg#86283) (#86293)
- Post summary: Show placeholders for an empty excerpt and a missing author (WordPress/gutenberg#85842) (#86294)
- Core fields: Restore the previous Publish and Status panel date behaviour (WordPress/gutenberg#86065) (#86295)
- Interactivity API: Show the data-wp-html fallback on created elements under Trusted Types (WordPress/gutenberg#84924) (#86306)
- [WP 7.2] UI: Add LoadingIndicator to item popups (WordPress/gutenberg#86303)
- Interactivity Router: Fix nested router regions without data-wp-interactive disappearing on navigation (WordPress/gutenberg#86061) (#86308)
- Interactivity API: Run watch() cleanups and attachTo render callbacks without a directive scope (WordPress/gutenberg#86058) (#86311)
- DataForm: Fix clipped focus ring of field values in panel layout (WordPress/gutenberg#86361) (#86369)
- Tests: Avoid passing an object when invoking static methods via reflection. (WordPress/gutenberg#86329)
- [WP 7.2] DropdownMenu: Invert the selected item indicator while highlighted (WordPress/gutenberg#86379)
- Fields: Lowercase the (no excerpt), (no author) and (no description) placeholders (WordPress/gutenberg#86391) (#86424)
- Core fields: Decode non-Latin slugs in the slug field (WordPress/gutenberg#86359)
- Interactivity API: Show the new page's server content in kept data-wp-html elements (WordPress/gutenberg#86416)
- DataForm: Tighten value density in the panel layout (WordPress/gutenberg#86389) (#86426)
- Post summary: Show "Immediately" and relative publish dates in the Date row (WordPress/gutenberg#86367)
- [WP 7.2] Block Styles: Show the active style variation in forced colors mode (WordPress/gutenberg#86450)
- Site Editor: Fix the frame snapping to the mobile width when resized with the mouse (WordPress/gutenberg#86423)
- Image: measure the lightbox container, not the image's parent (WordPress/gutenberg#82312) (#85491)
- URL: Decode percent-encoded characters in getFilename (WordPress/gutenberg#86422) (#86477)
- Fix: Hide the author avatar when the site does not show avatars and frame a blank one. (WordPress/gutenberg#86395)
- Date picker: Mark the posts of the month a typed or reset date moves to (WordPress/gutenberg#86298) (#86463)
- Fix iOS 27 tap into a heading leaving the caret in a quote (WordPress/gutenberg#85809)
- Hand focus back to the field on a press in every browser (WordPress/gutenberg#86549)
- Prevent jobs from running within forks on `push`. (WordPress/gutenberg#85968)
- i18n: Add translator context to the "Copy error" button label (WordPress/gutenberg#85967)
- Bubble editor canvas events to the outer iframe (WordPress/gutenberg#85263)
- UI: Use LoadingIndicator in remaining popup consumers (WordPress/gutenberg#86501)
- Block Editor: Keep the revision canvas read-only in preview mode (WordPress/gutenberg#84578)
- Core Data: Rank an exact title match first among tied link suggestions (WordPress/gutenberg#86327)
- Tests: Render the router-html-server context case through state (WordPress/gutenberg#86511)
- iOS tests: De-flake the selection handle test (WordPress/gutenberg#85461)

Props mamaduka, wildworks.
See #66340.
Built from https://develop.svn.wordpress.org/trunk@65379


git-svn-id: http://core.svn.wordpress.org/trunk@64518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
arshidkv12 pushed a commit to arshidkv12/wordpress-develop that referenced this pull request Nov 21, 2026
…r fields.

Turns on the panel layout's `showPlaceholderIfEmpty` option in `view-config.php` for 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 could be edited until they hovered it:

- `excerpt`, in the default post type form and in the `wp_block` form.
- `description`, in the `wp_template` form.
- `author`, in the default post type form and in the `attachment` form, 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.

Backports the changes from WordPress/gutenberg#85842.

Props oandregal, jorgefilipecosta, 0mirka00.
Fixes #65981.


git-svn-id: https://develop.svn.wordpress.org/trunk@65273 602fd350-edb4-49c9-b593-d223f7449a82
arshidkv12 pushed a commit to arshidkv12/wordpress-develop that referenced this pull request Nov 21, 2026
This updates the pinned commit hash of the Gutenberg repository from `c035c1a649ef68f5c1646694cf440df1d7ae6e62` to `1b0dc90c700746b108e080263a4dc67707b750a1` (fixes cherry-picked to the `wp/7.2` branch).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@c035c1a...1b0dc90

- [WP 7.2] Components, UI: Use focus-visible for disabled item focus rings (WordPress/gutenberg#86269)
- Notes: Keep the canvas still when a new note is added (WordPress/gutenberg#86283) (#86293)
- Post summary: Show placeholders for an empty excerpt and a missing author (WordPress/gutenberg#85842) (#86294)
- Core fields: Restore the previous Publish and Status panel date behaviour (WordPress/gutenberg#86065) (#86295)
- Interactivity API: Show the data-wp-html fallback on created elements under Trusted Types (WordPress/gutenberg#84924) (#86306)
- [WP 7.2] UI: Add LoadingIndicator to item popups (WordPress/gutenberg#86303)
- Interactivity Router: Fix nested router regions without data-wp-interactive disappearing on navigation (WordPress/gutenberg#86061) (#86308)
- Interactivity API: Run watch() cleanups and attachTo render callbacks without a directive scope (WordPress/gutenberg#86058) (#86311)
- DataForm: Fix clipped focus ring of field values in panel layout (WordPress/gutenberg#86361) (#86369)
- Tests: Avoid passing an object when invoking static methods via reflection. (WordPress/gutenberg#86329)
- [WP 7.2] DropdownMenu: Invert the selected item indicator while highlighted (WordPress/gutenberg#86379)
- Fields: Lowercase the (no excerpt), (no author) and (no description) placeholders (WordPress/gutenberg#86391) (#86424)
- Core fields: Decode non-Latin slugs in the slug field (WordPress/gutenberg#86359)
- Interactivity API: Show the new page's server content in kept data-wp-html elements (WordPress/gutenberg#86416)
- DataForm: Tighten value density in the panel layout (WordPress/gutenberg#86389) (#86426)
- Post summary: Show "Immediately" and relative publish dates in the Date row (WordPress/gutenberg#86367)
- [WP 7.2] Block Styles: Show the active style variation in forced colors mode (WordPress/gutenberg#86450)
- Site Editor: Fix the frame snapping to the mobile width when resized with the mouse (WordPress/gutenberg#86423)
- Image: measure the lightbox container, not the image's parent (WordPress/gutenberg#82312) (#85491)
- URL: Decode percent-encoded characters in getFilename (WordPress/gutenberg#86422) (#86477)
- Fix: Hide the author avatar when the site does not show avatars and frame a blank one. (WordPress/gutenberg#86395)
- Date picker: Mark the posts of the month a typed or reset date moves to (WordPress/gutenberg#86298) (#86463)
- Fix iOS 27 tap into a heading leaving the caret in a quote (WordPress/gutenberg#85809)
- Hand focus back to the field on a press in every browser (WordPress/gutenberg#86549)
- Prevent jobs from running within forks on `push`. (WordPress/gutenberg#85968)
- i18n: Add translator context to the "Copy error" button label (WordPress/gutenberg#85967)
- Bubble editor canvas events to the outer iframe (WordPress/gutenberg#85263)
- UI: Use LoadingIndicator in remaining popup consumers (WordPress/gutenberg#86501)
- Block Editor: Keep the revision canvas read-only in preview mode (WordPress/gutenberg#84578)
- Core Data: Rank an exact title match first among tied link suggestions (WordPress/gutenberg#86327)
- Tests: Render the router-html-server context case through state (WordPress/gutenberg#86511)
- iOS tests: De-flake the selection handle test (WordPress/gutenberg#85461)

Props mamaduka, wildworks.
See #66340.

git-svn-id: https://develop.svn.wordpress.org/trunk@65379 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported to WP Core Pull request that has been successfully merged into WP Core [Package] DataViews /packages/dataviews [Package] Fields /packages/fields [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants