Skip to content

Editor: Add the attachment entity view config for the media editor - #14513

Closed
jorgefilipecosta wants to merge 1 commit into
WordPress:trunkfrom
jorgefilipecosta:update/view-config-server-fields
Closed

jorgefilipecosta wants to merge 1 commit into
WordPress:trunkfrom
jorgefilipecosta:update/view-config-server-fields

Conversation

@jorgefilipecosta

@jorgefilipecosta jorgefilipecosta commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Backports the attachment view config of WordPress/gutenberg#84700 into the core.

This PR adds the view config of the attachment post type: the media editor form (title, alt text, caption and description, then date, author, filename, MIME type, file size, dimensions and "Attached to"). Without it, the media editor modal falls back to the default post type form and its "Details" tab shows only "Date added" and "Author".

Some notes:

  • The wp_navigation view config from the same Gutenberg PR is left out: only the Gutenberg navigation list route reads it, and core doesn't ship that route yet.
  • The root/site form, the wp_template reading_settings field and the group summaries of the default post type form are already in core.

Testing Instructions

  1. Run vendor/bin/phpunit --group view-config.
  2. With Editor: Register the core entity fields on the server #14512 applied, open the "Edit image" modal from the Image block toolbar and check that the "Details" tab shows the attachment fields.

Gutenberg PR: WordPress/gutenberg#84700

Trac ticket: https://core.trac.wordpress.org/ticket/66229

Use of AI Tools

AI assistance: Yes
Used for: porting the code and the tests from the Gutenberg PR, and drafting this description; 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.

@jorgefilipecosta
jorgefilipecosta marked this pull request as ready for review October 19, 2026 18:40
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props jorgefilipecosta.

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

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Adds the view config of the `attachment` post type, whose form is the media editor form. It replaces the default post type form, so the media editor no longer shows only the date and author.

Synced from WordPress/gutenberg#84700.

See #66229.
@jorgefilipecosta
jorgefilipecosta force-pushed the update/view-config-server-fields branch from d7b4ec5 to 398116c Compare October 19, 2026 19:34
@jorgefilipecosta jorgefilipecosta changed the title Editor: Update the entity view configs for the server fields Editor: Add the attachment entity view config for the media editor Oct 19, 2026
Comment thread src/wp-includes/default-filters.php Outdated

@oandregal oandregal 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've tested this as part of #14514

wporg-sync pushed a commit that referenced this pull request Oct 19, 2026
Adds the view config of the `attachment` post type. Its form is the one of the media editor: the editable fields (title, alt text, caption, and description) in a regular layout, then the date, author, file name, MIME type, file size, dimensions, and "Attached to" fields in panels. Only the form is replaced; the default view, the layouts, and the list view stay the ones `wp_get_entity_view_config()` builds for every post type.
Without it, the media editor falls back to the default post type form, and the "Details" tab of the "Edit image" modal shows only the date and the author.

Developed in #14513.
Synced from WordPress/gutenberg#84700.

Props jorgefilipecosta, oandregal.
See #66229.

git-svn-id: https://develop.svn.wordpress.org/trunk@64567 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Oct 19, 2026
Adds the view config of the `attachment` post type. Its form is the one of the media editor: the editable fields (title, alt text, caption, and description) in a regular layout, then the date, author, file name, MIME type, file size, dimensions, and "Attached to" fields in panels. Only the form is replaced; the default view, the layouts, and the list view stay the ones `wp_get_entity_view_config()` builds for every post type.
Without it, the media editor falls back to the default post type form, and the "Details" tab of the "Edit image" modal shows only the date and the author.

Developed in WordPress/wordpress-develop#14513.
Synced from WordPress/gutenberg#84700.

Props jorgefilipecosta, oandregal.
See #66229.
Built from https://develop.svn.wordpress.org/trunk@64567


git-svn-id: http://core.svn.wordpress.org/trunk@63717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@jorgefilipecosta

Copy link
Copy Markdown
Member Author

Committed at 388a22f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants