Skip to content
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

Import mediaUpload from @wordpress/editor #14651

Merged
merged 1 commit into from
Feb 13, 2020
Merged

Import mediaUpload from @wordpress/editor #14651

merged 1 commit into from
Feb 13, 2020

Conversation

pablinos
Copy link
Contributor

With the components moving from the @wordpress/editor package to
@wordpress/block-editor the import statements were updated 47bd913. However, the
mediaUpload function didn't move packages and this broke part of some of
the media blocks' upload mechanisms.

Fixes #14457

Changes proposed in this Pull Request:

This change swaps back to importing mediaUpload from @wordpress/editor

At some point, we should probably move to getting mediaUpload from the editor settings, but currently, nothing is deprecated and that has only fairly recently become a stable API WordPress/gutenberg#18156

Is this a new feature or does it add/remove features to an existing part of Jetpack?

This is a bug fix

Testing instructions:

Follow the testing instructions in #14457 and check that you can now upload media to a Slideshow, VideoPress and Tiled Gallery block

Proposed changelog entry for your changes:

Bug fixed that prevented media being uploaded in the Slideshow, Tiled Gallery, and VideoPress blocks

With the components moving from the @wordpress/editor package to
@wordpress/block-editor the import statements were updated. However, the
mediaUpload function didn't move packages and this broke part of some of
the meda block's upload mechanisms.

This change swaps back to importing mediaUpload from @wordpress/editor
@pablinos pablinos added [Feature] VideoPress A feature to help you upload and insert videos on your site. [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Block] Slideshow [Block] Tiled Gallery labels Feb 12, 2020
@pablinos pablinos requested a review from a team February 12, 2020 11:33
@pablinos pablinos self-assigned this Feb 12, 2020
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello pablinos! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D38748-code before merging this PR. Thank you!

@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: March 3, 2020.
Scheduled code freeze: February 25, 2020

Generated by 🚫 dangerJS against 8b93f16

Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice digging!

Tests well in Jetpack with Gutenberg 7.4.0. Didn't test VideoPress tho!

image

@jeherve jeherve added this to the 8.3 milestone Feb 12, 2020
@kraftbj kraftbj self-requested a review February 12, 2020 17:03
Copy link
Contributor

@kraftbj kraftbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this after confirming the bug and the fix using the instructions from 14457 with latest stable WP.

When uploading the original image to a Jetpack Slideshow block, I did get a "uncaught exception: Object" error in the console both on master and this branch, so I'm assuming it is unrelated.

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Feb 12, 2020
@kraftbj kraftbj removed the request for review from jeherve February 12, 2020 17:13
@zinigor zinigor merged commit a86936f into master Feb 13, 2020
@zinigor zinigor deleted the fix/media-upload branch February 13, 2020 07:48
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Feb 13, 2020
@simison
Copy link
Member

simison commented Feb 13, 2020

Can someone take care of deploying D38748-code ? Thanks!

@zinigor
Copy link
Member

zinigor commented Feb 13, 2020

Done in r202797-wpcom.

@kraftbj kraftbj modified the milestones: 8.3, 8.2.1 Feb 14, 2020
jeherve pushed a commit that referenced this pull request Feb 17, 2020
With the components moving from the @wordpress/editor package to
@wordpress/block-editor the import statements were updated. However, the
mediaUpload function didn't move packages and this broke part of some of
the meda block's upload mechanisms.

This change swaps back to importing mediaUpload from @wordpress/editor
@jeherve
Copy link
Member

jeherve commented Feb 17, 2020

Cherry-picked to branch-8.2 in 35a989d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slideshow & Tiled gallery blocks: Error uploading additional images
7 participants