Skip to content

Conversation

arthur791004
Copy link
Contributor

@arthur791004 arthur791004 commented Aug 22, 2025

Fixes p1755839647067029/1755669212.510819-slack-C091P0A65U5

Proposed changes:

  • Load newspack blocks feature on agency sites
Content Carousel Blog Posts
image image

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

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

Testing instructions:

  • Go to your a4a dev site
  • Apply changes to your site via Jetpack Beta Tester
  • Go to the editor
  • Insert block
  • Ensure you can see both Content Carousel and Blog Posts
  • Ensure both blocks can be inserted successfully

@arthur791004 arthur791004 self-assigned this Aug 22, 2025
Copy link
Contributor

github-actions bot commented Aug 22, 2025

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 WoA dev 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 (WordPress.com Site Helper), and enable the feat/load-newspack-blocks-on-a4a branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack-mu-wpcom-plugin feat/load-newspack-blocks-on-a4a

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 [Package] Jetpack mu wpcom WordPress.com Features [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Wpcomsh labels Aug 22, 2025
Copy link
Contributor

github-actions bot commented Aug 22, 2025

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 Review, ...).
  • ✅ Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ 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 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Mu Wpcom plugin:

  • Next scheduled release: WordPress.com Simple releases happen semi-continuously (PCYsg-Jjm-p2)

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


Wpcomsh plugin:

  • Next scheduled release: Atomic deploys happen twice daily on weekdays (p9o2xV-2EN-p2)

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

@github-actions github-actions bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Aug 22, 2025
Copy link

jp-launch-control bot commented Aug 22, 2025

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php 0/323 (0.00%) 0.00% 5 💔

Full summary · PHP report

Coverage check overridden by I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. .

@arthur791004 arthur791004 requested a review from a team August 25, 2025 08:14
@arthur791004 arthur791004 added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Aug 25, 2025
@@ -290,6 +290,23 @@ public static function load_features() {
require_once __DIR__ . '/features/wpcom-widgets/wpcom-widgets.php';
require_once __DIR__ . '/features/wpcom-wpadmin-page-view/wpcom-wpadmin-page-view.php';

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

I think all the inline logic here is out of place and does not belong here. The function comment explicitly says:

	/**
	 * Load features that don't need any special loading considerations.
	 */
	public static function load_features() {

Maybe create another function like load_newspack_blocks()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created by 8e01271.

@@ -409,10 +425,6 @@ public static function load_etk_features() {

/**
* Load features for the editor and the frontend pages.
*
* This also avoid redeclaring the `Newspack_Blocks` class as follows
Copy link
Contributor

@fushar fushar Aug 26, 2025

Choose a reason for hiding this comment

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

Should we delete

if ( ! class_exists( '\Newspack_Blocks', false ) ) {
	require_once __DIR__ . '/features/newspack-blocks/index.php';
}

given that we already load it in load_features()?

Copy link
Contributor

@fushar fushar left a comment

Choose a reason for hiding this comment

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

Tested and it works perfectly!

@arthur791004 arthur791004 merged commit 0848aea into trunk Aug 28, 2025
64 checks passed
@arthur791004 arthur791004 deleted the feat/load-newspack-blocks-on-a4a branch August 28, 2025 08:23
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. [Package] Jetpack mu wpcom WordPress.com Features [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Wpcomsh [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.

2 participants