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

Jetpack Sync: extract video and audio shortcodes #38556

Merged
merged 5 commits into from
Aug 9, 2024

Conversation

trakos
Copy link
Contributor

@trakos trakos commented Jul 26, 2024

Proposed changes:

Support video and audio shortcodes in Media Extractor.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

panfyZ-3Qs-p2#comment-9718

Requires D156727-code to update tests first.

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

No

Testing instructions:

Testing on a post in wpcom: 35368-pb/#plain

Copy link
Contributor

github-actions bot commented Jul 26, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the add/extract-video-shortcode branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack add/extract-video-shortcode
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress labels Jul 26, 2024
Copy link
Contributor

github-actions bot commented Jul 26, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team Review" label and ask someone from your team review the code. Once reviewed, it can then be merged.
If you need an extra review from someone familiar with the codebase, you can update the labels from "[Status] Needs Team Review" to "[Status] Needs Review", and in that case Jetpack Approvers will do a final review of your PR.


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen daily.
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly. The next release is scheduled for September 3, 2024 (scheduled code freeze on September 2, 2024).

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@trakos trakos marked this pull request as ready for review July 26, 2024 18:50
@trakos trakos added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] In Progress labels Jul 26, 2024
@trakos trakos force-pushed the add/extract-video-shortcode branch from f8572d1 to 2c3ef1b Compare July 27, 2024 03:38
@trakos trakos changed the title Jetpack Sync: extract video shortcodes Jetpack Sync: extract video and audio shortcodes Jul 27, 2024
@trakos trakos force-pushed the add/extract-video-shortcode branch from a8d4d98 to 59012cb Compare July 27, 2024 04:40
@monsieur-z
Copy link
Contributor

Could you add detailed testing instructions, @trakos? Thanks

@trakos
Copy link
Contributor Author

trakos commented Jul 30, 2024

Could you add detailed testing instructions, @trakos? Thanks

Thanks for taking a look, @monsieur-z! I've created a pb with steps for testing from wpcom: 35368-pb/#plain

There's also an automated test that verifies video shortcode URL:

jetpack docker phpunit -- --filter=WP_Test_Jetpack_MediaExtractor

@trakos
Copy link
Contributor Author

trakos commented Aug 7, 2024

Hi @jeherve, do you know if there's someone familiar with Media Extractor who would be able to review this? We mostly test those changes on wpcom, but it's also used in Jetpack, so we were hoping for an additional review - panfyZ-3Qs-p2#comment-9724. Thanks!

@jeherve jeherve added [Feature] Sharing Post sharing, sharing buttons [Feature] Publicize Now Jetpack Social, auto-sharing [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Pri] Normal labels Aug 7, 2024
@jeherve
Copy link
Member

jeherve commented Aug 7, 2024

@Automattic/jetpack-reach Is this something you could look at? I suspect this may impact Publicize since more content could make it to Open Graph Meta tags and publicized posts?

@trakos Do you think it would be possible to add tests to projects/plugins/jetpack/tests/php/media/test-class.jetpack-media-extractor.php to cover those new use-cases?

@trakos
Copy link
Contributor Author

trakos commented Aug 8, 2024

Thank you for looking into this!

I suspect this may impact Publicize since more content could make it to Open Graph Meta tags and publicized posts?

I think that it shouldn't affect it unless Media Summary switch would be changed to include those two shortcodes, but I'd appreciate if someone would be able to double-check that.

@trakos Do you think it would be possible to add tests to projects/plugins/jetpack/tests/php/media/test-class.jetpack-media-extractor.php to cover those new use-cases?

Good point, I've added two new methods with more shortcodes to test on.

@spsiddarthan
Copy link
Contributor

Thanks for the ping, @jeherve. The OG:tags appear to be working OK.

I ran the changes on my sandbox and published a post with images in the body and the video shortcode like this on this branch.

@trakos, do you think the following post is a good way to test this? I have an image in the body of the post and video shortcode in there. Happy to give it an approval after you confirm. :)

CleanShot 2024-08-08 at 11 45 53@2x

I shared it to Tumblr to using Jetpack Social. I also shared it fo Facebook/Threads/Linkedin. They all looked OK.

Tumblr showed up like this, but it was like that on trunk as well.

CleanShot 2024-08-08 at 11 43 26@2x

@trakos
Copy link
Contributor Author

trakos commented Aug 8, 2024

@trakos, do you think the following post is a good way to test this? I have an image in the body of the post and video shortcode in there. Happy to give it an approval after you confirm. :)

@spsiddarthan thank you for testing this! Yes, that's a good post to test it on, since the video shortcode URL would be picked up now with my changes - glad to hear it didn't affect sharing.

@trakos trakos removed the [Status] Needs Review To request a review from Crew. Label will be renamed soon. label Aug 9, 2024
@trakos trakos added the [Status] Ready to Merge Go ahead, you can push that green button! label Aug 9, 2024
@trakos trakos merged commit 65af4d4 into trunk Aug 9, 2024
57 checks passed
@trakos trakos deleted the add/extract-video-shortcode branch August 9, 2024 07:24
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Aug 9, 2024
@github-actions github-actions bot added this to the jetpack/13.8 milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Publicize Now Jetpack Social, auto-sharing [Feature] Sharing Post sharing, sharing buttons [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal [Tests] Includes Tests [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants