Image block: Hide drag handles while an upload is in progress#77121
Image block: Hide drag handles while an upload is in progress#77121andrewserong wants to merge 3 commits intotrunkfrom
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. |
ramonjd
left a comment
There was a problem hiding this comment.
Agree, much tidier!
Kapture.2026-04-08.at.16.14.32.mp4
Also checked with HEIC!
|
Size Change: +34 B (0%) Total Size: 7.74 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Thanks for the quick review! 🙇 |
|
Flaky tests detected in 7285744. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24121294916
|
What?
Hide the drag handles on an image block while an upload is in progress.
Why?
While you can technically interact with the block while the upload is in progress, the drag handles in this state aren't particularly useful.
Additionally, if a user is uploading an HEIC file, then (currently) using the server-side upload approach, the image isn't previewable in the editor during upload and the resize handles can display in the wrong place.
It's tidier all around if we hide the drag handles while an upload is in progress.
How?
Add some simple conditions to ensure the drag handles are not visible if the image is a temporary URL (i.e. an upload is in progress), or the sub-size images are being sideloaded.
Testing Instructions
On trunk:
With this PR:
Screenshots or screencast
Before (JPEG)
2026-04-08.15.44.12.mp4
After (JPEG)
2026-04-08.15.44.38.mp4
Before (HEIC)
2026-04-08.15.49.02.mp4
After (HEIC)
2026-04-08.15.47.52.mp4
Use of AI Tools
Claude Code to generate the code change. Tested manually and wrote the PR description myself 😄