Skip to content

Conversation

@jd-alexander
Copy link
Contributor

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

Fixes wordpress-mobile/gutenberg-mobile#3523

WordPress Android wordpress-mobile/WordPress-Android#14680
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

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • 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 test the changes on this Pull Request by downloading it from AppCenter here with build number: 49605. IPA is available here. If you need access to this, you can ask a maintainer to add you.

@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 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 added this to the 17.5 milestone 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
.unsupportedBlockEditor: isUnsupportedBlockEditorEnabled,
.canEnableUnsupportedBlockEditor: post.blog.jetpack?.isConnected ?? false,
.audioBlock: !isFreeWPCom, // Disable audio block until it's usable on free sites via "Insert from URL" capability
.audioBlock: !isFreeWPCom,
Copy link
Contributor

Choose a reason for hiding this comment

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

Related to this comment, what do you think about renaming the capability?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here 2d20967

@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 jd-alexander requested a review from fluiddot May 27, 2021 05:12
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.

I tested on iPhone 11 (iOS 14.2) and works nice 🎊 !

Once the Gutenberg PR is approved I'll do a second run and approve it.

@fluiddot
Copy link
Contributor

I tested on iPhone 11 (iOS 14.2) and works nice 🎊 !

Once the Gutenberg PR is approved I'll do a second run and approve it.

After further testing, I've spotted an error when uploading an audio file via the "Other Apps" option, here is the comment on GB-mobile with all the details.

@jkmassel
Copy link
Contributor

We're cutting 17.5 today, so this PR is being bumped to 17.6

@jkmassel jkmassel modified the milestones: 17.5, 17.6 May 31, 2021
@fluiddot
Copy link
Contributor

fluiddot commented Jun 1, 2021

Looks like CircleCI didn't post the comment referencing the installable builds so here it goes.

Latest installable build: 49354.

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. and removed [Status] DO NOT MERGE labels Jun 3, 2021
@fluiddot fluiddot merged commit 61f4068 into develop Jun 3, 2021
@fluiddot fluiddot deleted the add/audio-block-capability branch June 3, 2021 15:01
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