-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Gutenberg] Fix media upload progress indicators #20426
Conversation
Generated by 🚫 Danger |
Quality Gate passedIssues Measures |
@fluiddot / @antonis We've noted that the horizontal media progress indicators within the Editor no longer increment in WP/JPAndroid 24.4-rc-1. This appears to affect Android only, and has been partially captured in wordpress-mobile/gutenberg-mobile#6667. In my debugging of that issue, I noted that the value of Lines 761 to 772 in 0cdfeac
When logging out the values of In this PR, I'm exploring that perhaps some of the media upload progress logic was unintentionally removed when removing Story code, possibly within: I'll continue to explore ideas in how the methods in this draft PR would be invoked to update media progress and send it to the Gutenberg Editor -- If you have any further thoughts on this approach, or other areas to explore that may be helpful, please let me know. |
Thank you for the ping @derekblank 🙇 My understanding was that the removed Let me know if I can help on this investigation and feel free to add me as a reviewer. |
@antonis Thanks for the extra info and context -- it helps to rule things out. 🙇 Especially, noting that wordpress-mobile/gutenberg-mobile#6667 preceded the stories removal PRs, which I hadn't yet noted. This helps to widen the debugging timeline. |
I had a 2nd look on how the video upload progress is communicated and noticed that the progress is passing to the gluecode. Note on the recording below I initially did an upload with no breakpoints and no progress was displayed. On the second attempt I added a breakpoint on the line above and some progress was displayed on the screen. A hypothesis may be that too many events are emitted and dropped (in that case maybe we can throttle them similar to this) or the progress values are inconsistent 🤔 Screen_recording_20240307_120632.mp4 |
Thanks for taking a second look, and good catch on the progress making it to the glue code. I noted that the progress value increments to a very small number (like |
On investigating further, indeed the onMediaUploadProgress events are still retained from from the EditorMediaUploadListener Interface. With the additional context of the timeline, I agree the Story removals code is not likely to have affected the progress event. But, I have not yet been able to determine what else may have changed between 24.3 and 24.4 that may have affected the progress events. I had considered if it could have been related to Jetpack plugin updates, but the issue still occurs for Image and Video blocks on WP.com and self-hosted sites, with and without the Jetpack plugin installed. Possibly something external, like changes to the REST client? From logging out progress values in the MediaUploadHandler, the progress value appears to increment only once with a very small initial (but it does send this value to the Glue Code and the Editor UI, as you can see a very small increment in the Progress Bar indicator component. Just recapping my findings and will continue to investigate further. Open to ideas for leads. |
Closing this as this is not actively being worked on, we can reopen it if needed. |
WIP: Fixes media upload progress indicators not incrementing
Addresses:
To Test:
Current Behavior:
Expected Behavior:
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):