-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio Block: Do not persist blob urls and fix undo #63257
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: +61 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Related #39223
Similar to #63076 and #63238
What?
In #63076, we introduced the concept of local attributes to allow setting attributes that won't be persisted. It's useful during file uploads for instance where we want immediate user feedback but without impacting the saved post.
In the previous PR, we implemented it for image and video blocks and this PR does the same for the audio block. This PR also fixes an undo bug in the audio block.
Testing Instructions
1- Throttle your network speed (that way uploading audio will take a long time)
2- Drag and drop a video file into the post editor.
3- Save the post immediately.
4- Open the post in a new tab and notice that the inserted audio is actually empty.
5- Go back to the old tab, and wait until the upload completes.
6- Notice that the audio block has been updated properly with the right URL.
You can also try undoing uploads and it should results in empty audio blocks.