File Block: Replace on-mount downloadButtonText effect with a default variation#79236
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: +46 B (0%) Total Size: 8.59 MB 📦 View Changed
|
|
Flaky tests detected in 97d1cf4. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/27619317820
|
What?
PR replaced the on-mount
useEffectthat imperatively set the localizeddownloadButtonTextdefault ("Download") with a declarativeisDefaultblock variation, mirroring the Search block pattern.This also fixed an odd bug with the File block in StrickMode, when reloading a newly saved post, it becomes dirty again. Related #73378.
P.S. I've wanted to remove this effect for a while. Props @t-hamano for suggesting this method in a different PR.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screencast
CleanShot.2026-06-16.at.17.25.05.mp4
Use of AI Tools
Assisted by Claude.