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

External Media: Show for empty galleries #16288

Merged
merged 1 commit into from
Jun 25, 2020
Merged

External Media: Show for empty galleries #16288

merged 1 commit into from
Jun 25, 2020

Conversation

obenland
Copy link
Member

This PR fixes a regression introduced in d2c4f68, where External Media would not be available for empty galleries.

Fixes #16069 (comment)

Changes proposed in this Pull Request:

  • Always treat value like an array and check for the amount of items it contains.

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

  • After applying this PR and building extensions, open the Editor.
  • Insert any gallery-type block (gallery, tiled-galley, slideshow) and make sure External Media is available when the block is empty, and unavailable when it contains at least one image
  • Insert any other image-type block (image, media/text, featured image, cover) and make sure External Media is always available, even when it contains an image.

Proposed changelog entry for your changes:

  • None needed.

@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello obenland! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D45504-code before merging this PR. Thank you!
This revision will be updated with each commit to this PR

@obenland obenland added [Extension] External Media Extend all block editor media tools to support external providers [Status] Needs Team Review labels Jun 25, 2020
@obenland obenland requested review from a team June 25, 2020 17:48
@obenland obenland added the [Type] Bug When a feature is broken and / or not performing as intended label Jun 25, 2020
@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.

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16288

Scheduled Jetpack release: July 7, 2020.
Scheduled code freeze: June 30, 2020

Generated by 🚫 dangerJS against 2212091

@obenland obenland self-assigned this Jun 25, 2020
Copy link
Contributor

@retrofox retrofox left a comment

Choose a reason for hiding this comment

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

LGTM

empty gallery

not empty gallery

It doesn't open the external media modal.

@obenland obenland added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Team Review labels Jun 25, 2020
@jeherve jeherve added this to the 8.7 milestone Jun 25, 2020
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This tests well for me. 🚢

@jeherve jeherve 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 Jun 25, 2020
@obenland obenland merged commit 2a70184 into master Jun 25, 2020
@obenland obenland deleted the fix/em-gallery branch June 25, 2020 20:01
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Jun 25, 2020
@obenland
Copy link
Member Author

r209630-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Extension] External Media Extend all block editor media tools to support external providers Touches WP.com Files [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants