Repository navigation
File Block: Add a Media section and a setup-state toolbar option - #84608
im3dabasia wants to merge 7 commits into
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: +119 B (0%) Total Size: 8.9 MB 📦 View Changed
From ⚡ 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. As a user I want to be able to create a navigation overlay for a specific navigation block in
|
|
I don't object to the Inspector control, but it's a shame that it puts other settings one click further away in favor of something that can already be set via the toolbar and the placeholder state. Curious how others feel about this one. |
I feel the same and shared the same point in #73466, among other concerns. Since the edit or design mode idea has lost appeal and pattern editing continues, the Content tab seems the right place for this, but I would make it less prominent. To connect this with #84605, I lean toward creating rules for what to show inside the control and making the different states clearer. I will elaborate more about this in #84605 |
This point is valid, the problem is for things like Site Logo where this would mean three tabs even if the second "settings" tab is not that used at the moment.
It sounds like you're about to comment on a larger strategy, which is valid, so just for awareness before I saw your comment about this concern, I posted #66563 (comment) which suggested still proceeding. I'll pause that work though, and wait for your ideas. For me the main problem to solve is still this:
The dropzone, even the button inside can disappear if the logo is made smaller, is not very ergonomic, and the inspector CTA to add a site logo feels like a more intuitive way to add a logo. Images, Cover blocks, File blocks, Embeds, all blocks that feature placeholders can be 20x20px blocks in the canvas, and when they are so small, there needs to be some simple way of adding media to them—escaping their setup state. |
|
I shared an idea in #66563 about how the control handles different media types. |
|
Rebased on #86170, so a file now shows the file icon rather than an empty thumbnail. @t-hamano both your points above are addressed. Would you be able to take another look?
One open question from the issue, the panel sits in the Content tab, which gives File a third tab. @jasmussen you raised this for Site Logo, happy to move it to Settings if that's preferred. |



What?
See #66563.
File now offers media from the inspector and from the toolbar in its setup state, like Image, Cover, Media & Text and Site Logo.
Why?
1. The toolbar only appeared once a file was set, so it could replace but never add.
2. The inspector had no File section at all.
How?
Same pattern as #84602 (Video), worth reviewing that one first.
edit.jsxrather thanFileBlockInspector, since that readshrefand would throw before a file is setmediaTypeafter Block Library: Show media type icons in the inspector media control #86170, so a file shows the file icon rather than an empty thumbnailScreencast
Screen.Recording.2026-10-13.at.1.59.13.PM.mov
Testing Instructions
On the duplication
Use of AI Tools
Claude Code. I reviewed and tested the change and take responsibility for it.