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

[Gutenberg] Audio block capability now enables/disables media upload's media sources #14680

Merged
merged 13 commits into from
Jun 3, 2021

Conversation

jd-alexander
Copy link
Contributor

@jd-alexander jd-alexander commented May 19, 2021

Fixes wordpress-mobile/gutenberg-mobile#3523

WordPress iOS wordpress-mobile/WordPress-iOS#16533
Gutenberg Mobile wordpress-mobile/gutenberg-mobile#3523
Gutenberg WordPress/gutenberg#31966

Description

This PR checks to see if the user's site is on a free, paid or self hosted plan and as such, the relevant media upload options are shown.

Free Plans Paid Plans Self Hosted
Insert from URL Insert from URL Insert from URL
- Choose from device Choose from device
- WordPress Media Library WordPress Media Library

Testing

WP.com sites

Note:

Support for Audio block audio uploads, and access to the media library is restricted to sites that are on a paid plan.

Free Plan

  1. Create a new post.
  2. Add the Audio block.
  3. Notice that only the Insert from URL option is available as users aren't able to upload audio on free plans.

Paid plan

  1. Create a new post.
  2. Add the Audio block.
  3. Notice that all media options are available as users are able to upload audio on paid plans.
Free Plan Paid Plan

Self hosted sites

  1. Create a new post.
  2. Add the Audio block.
  3. Notice that all media options are available as users are able to upload audio on self hosted sites.

Regression Notes

  1. Potential unintended areas of impact

The blocks Cover, File, Gallery, Video, Media & Text all utilise the media-upload component that was modified. Verify that these blocks function as expected and all the relevant options are still shown for them in both paid and free plans.

  1. What I did to test those areas of impact (or what existing automated tests I relied on)
    There are existing tests that are doing uploads via the WP media library and the file system so if there was an issue with the implementation those tests would fail.

  2. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented May 19, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@jd-alexander jd-alexander added this to the 17.5 milestone May 19, 2021
@jd-alexander jd-alexander changed the title [Gutenberg - Test] Audio block capability now enables/disables media upload's media sources [TEST] Gutenberg - Audio block capability now enables/disables media upload's media sources May 19, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented May 19, 2021

You can test the changes on this Pull Request by downloading the APK here.

@jd-alexander jd-alexander changed the title [TEST] Gutenberg - Audio block capability now enables/disables media upload's media sources [Gutenberg] Audio block capability now enables/disables media upload's media sources May 20, 2021
@jd-alexander jd-alexander requested a review from fluiddot May 20, 2021 03:45
@jd-alexander jd-alexander marked this pull request as ready for review May 20, 2021 03:45
@jd-alexander
Copy link
Contributor Author

This PR will be updated once wordpress-mobile/gutenberg-mobile#3548 is merged in so a final Gutenberg Mobile PR wordpress-mobile/gutenberg-mobile#3523 can be generated for testing on both platforms.

@fluiddot
Copy link
Contributor

This PR will be updated once wordpress-mobile/gutenberg-mobile#3548 is merged in so a final Gutenberg Mobile PR wordpress-mobile/gutenberg-mobile#3523 can be generated for testing on both platforms.

@jd-alexander Heads up that the PR is already merged

@jd-alexander
Copy link
Contributor Author

Lint failures are unrelated to the changes I made. Not sure what is causing them. I will check that out tomorrow.

@fluiddot
Copy link
Contributor

Lint failures are unrelated to the changes I made. Not sure what is causing them. I will check that out tomorrow.

This happened to me too on a different PR and after restarting the job it worked 🤷‍♂️ . I'll restart it for you if you don't mind just in case it works.

@hypest
Copy link
Contributor

hypest commented May 27, 2021

Perhaps needs update from develop @jd-alexander ?

@jd-alexander
Copy link
Contributor Author

Perhaps needs update from develop @jd-alexander ?

Indeed! I am going to give that a go shortly.

@jd-alexander jd-alexander modified the milestones: 17.5, 17.6 May 28, 2021
Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

LGTM 🎊 !

Approved via WordPress/gutenberg#31966 (review).

@fluiddot fluiddot self-assigned this Jun 3, 2021
@fluiddot fluiddot added Gutenberg Editing and display of Gutenberg blocks. gutenberg-mobile and removed [Status] Not Ready for Merge labels Jun 3, 2021
@fluiddot
Copy link
Contributor

fluiddot commented Jun 3, 2021

The installable build is failing because the tab v1.55.0-alpha1 contains changes from GB-mobile that require this WPAndroid PR to be merged first.

@fluiddot
Copy link
Contributor

fluiddot commented Jun 3, 2021

The installable build is failing because the tab v1.55.0-alpha1 contains changes from GB-mobile that require this WPAndroid PR to be merged first.

Heads up that this PR can't be merged at this stage because the Gutenberg Mobile reference contains changes from this other PR that neither can't be merged due to the lack of the changes from this one 🙃 .

I pinged @SiobhyB, as the author of that PR, and we decided to merge these changes there, here is the merge commit. Once that PR gets merged, this will be automatically closed.

@SiobhyB SiobhyB merged commit 3e2d759 into develop Jun 3, 2021
@SiobhyB SiobhyB deleted the gutenberg/audio-block-capability branch June 3, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants