Repository navigation
Post publish upload media dialog: handle more block types - #65122
Conversation
|
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 If 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. |
|
Size Change: +1.18 kB (+0.07%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 874c5f5. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10774199552
|
swissspidy
left a comment
There was a problem hiding this comment.
Some initial comments after a quick look, will do some in-depth testing later
|
Thank you for the review, @swissspidy! 🙌 I believe I addressed all your comments, so please go ahead and take another look when you get a chance 👍 |
I think I'd expect only two images in the list ( |
Yes, I agree that would be the most user-friendly approach, in general. That said, I think changes to the UI go somewhat beyond the scope of this PR. Furthermore, I'm not sure if there would be any a11y concerns, since each image can have its own alt text (the demo HTML I provided does this, to verify everything is plumbed correctly), which means it could be important to display them separately. |
|
Thank you for the review, @swissspidy! 🙌 |
…y filter (#82258) * Revisions: Meet AA contrast for the inline del diff without an opacity filter The Visual History inline removed-text diff (`<del class="revision-diff-removed">`) had no color of its own: it inherited the theme body color and pushed it through an SVG feColorMatrix filter that desaturates, red-tints, and composites every glyph at 80% opacity. The rendered contrast therefore varied with the block background and could only ever drop below the theme's own body text - unverifiable, and thin on dark backgrounds. Keep the filter for block-level removed elements (images/blocks) only. Inline removed text now stays at currentColor with a faint red background tint that mirrors `.revision-diff-added`, plus a red text-decoration-color, so it retains the theme's AA-compliant body contrast on any background while del/ins stay a symmetric pair. Align the sidebar field-diff `<del>` the same way (it was `color: #d63638`, 4.72:1 on white - on the AA floor). Part of #77530 / Trac #65122. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5GQ2phmzjsrBtAxcctNJr * Revisions: Fill in the CHANGELOG PR reference Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5GQ2phmzjsrBtAxcctNJr * Move the CHANGELOG entry to Unreleased and drop entries duplicated by the trunk merge Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: anamwp <theanamhossain@git.wordpress.org> Co-authored-by: joedolson <joedolson@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
This PR adds new block types to the post publish upload media dialog, so that external images in them are also considered for upload.
As part of this work, it also deduplicates URLs and generates unique filenames before upload.
This PR fixes #64899.
Why?
The post publish upload media dialog suggests uploading external media to the media library, for both performance and reliability reasons. However, it currently only does so for Image blocks, which limits its usefulness.
How?
Custom logic was added to handle
media-textandcoverblocks, as well as to generate adequate filenames before uploading.Testing Instructions
Post contents
/wp-content/uploads/)WordPress-logotype-standard.pngandWordPress-logotype-standard-<some UUID>.png. The second file is expected because we used a different URL (via a query parameter) on the last block, and it's expected to have the UUID for deduplication of the filename.Testing Instructions for Keyboard
N/A, no UI changes.