Repository navigation
Conversation
…field Adds the shared pieces for editing links in a block's Content tab (#85961): - LinkPicker takes `showSuggestions`. With it off, the popover asks for a URL and does not search for suggestions, for blocks like Social Icon. - MediaLinkControl and MediaLinkNewTabControl in block-library's utils offer the media link destinations (None, Media file, Attachment page, Custom URL via LinkPicker) and Open in new tab in the inspector. Blocks choose which destinations to offer, so File can offer only Media file and Attachment page. - The toolbar's ImageURLInputUI now shares its destination matching and new tab rel handling with the inspector fields, through the private getMediaLinkDestination and getNewTabLinkAttributes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1u1vgir2YJpmNhb7h3ESd
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. 📦 Bundle sizeSize Change: +1.26 kB (+0.01%) Total Size: 8.57 MB 📦 View Changed
🏁 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. User Mention: should insert two subsequent mentions in
|
…icker Drop the Link to dropdown. The field is a single LinkPicker that offers Media file and Attachment page above its page suggestions, with a Remove link button beside the preview. LinkPicker gains transformSuggestions, passed to its LinkControl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1u1vgir2YJpmNhb7h3ESd
Move the File block's file, file name, link, new tab and download button controls to an inspector Content tab, with a Media control to replace the file. The inline PDF embed settings stay on the Settings tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1u1vgir2YJpmNhb7h3ESd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1u1vgir2YJpmNhb7h3ESd
The media Link to field is now a link picker that offers the media file and the attachment page as suggestions, not a dropdown. Open the picker and choose a suggestion, check that only those two are offered with no Remove link button, and anchor the Media button's name so it no longer matches the Link to preview, whose name includes the file URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S1u1vgir2YJpmNhb7h3ESd
jeryj
force-pushed
the
add/file-content-tab
branch
from
October 30, 2026 21:18
72474d3 to
592af2e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Part of #85961. Closes #86202. Depends on #85970 (its commit is included here).
Selecting a File block opens the inspector on a Content tab, like the Image block, whether or not the inline PDF embed is showing. The tab has one Media panel with, in order:
MediaControl(upload, Media Library, Replace, Reset), the same control Image, Cover and Media & Text use.Show inline embed and Height in pixels stay on the Settings tab, under PDF settings.
Why?
The File block has no Content tab today. It opens on Settings, and the file can only be replaced from the toolbar's Replace menu. #85961 tracks giving blocks with a link or media a Content tab built from shared fields, and File has the same gap as the List View children it lists.
How?
file/inspector.jsxrenders the content controls inInspectorControls group="content"and keeps the PDF settings in the default group. The old Settings panel is gone; its three controls moved to the Content tab.MediaLinkControlandMediaLinkNewTabControlfrom Block Editor: Add a media Link to field #85970, limited to themediaandattachmentdestinations, so the picker suggests only Media file and Attachment page and has no Remove link button. The View button is the sharedViewLinkButton.onSelectFileandonUploadErroras the toolbar's Replace menu, so replacing a file behaves the same from either place. The toolbar's Replace and Copy URL are unchanged.<or&stays literal instead of becoming markup. Editing them in the sidebar drops inline formatting such as bold, as the Navigation Link Text field does today; Navigation Link: Keep the text formatting when editing in the sidebar #85223 can be adopted here once it lands.textLinkTargettoundefinedinstead offalse. Both serialize without atargetattribute, which the new e2e test checks.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools
Written with Claude Code.
🤖 Generated with Claude Code
https://claude.ai/code/session_01S1u1vgir2YJpmNhb7h3ESd