Skip to content

Conversation

@sirreal
Copy link
Member

@sirreal sirreal commented Sep 15, 2025

Proposed changes:

  • Add an enhanced Code block to jetpack-mu-wpcom.

The block is disabled by default. It requires a filter to be activated. This PR introduces the implementation but does not enable any new functionality.

The block currently looks like this:

Inserter Block
Screenshot 2025-09-23 at 11 43 00 Screenshot 2025-09-23 at 11 43 55

The block name and some warnings will be changed before final release but are still important to keep during testing.

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)?

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

No.

Testing instructions:

See pgsdXZ-aB-p2.

It's important to confirm that:

  • The block is not enabled by default.
  • No errors or warnings are produced when the block is disabled.
  • Test these changes on a WordPress.com simple site. With the exception of a few test sites, the block should not be available.
  • Test these changes on a WoA (WordPress.com + WP.Cloud) site. The block should not be available.

Before release, the block will undergo a complete Call for Testing.

The block can be tested with these filters:

// Enable the block
add_filter( 'jetpack_mu_wpcom_should_load_code_block', '__return_true' );

// Disable the block
add_filter( 'jetpack_mu_wpcom_should_load_code_block', '__return_false' );

@github-actions
Copy link
Contributor

github-actions bot commented Sep 15, 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 Sep 15, 2025
@gziolo
Copy link
Member

gziolo commented Sep 17, 2025

Excellent progress! 🎉

How can I test it? What's left to do?

I see that it's implemented as a standalone block. What is your latest opinion about having it as a new block vs enhancing the Code (core/code) block?

@sirreal
Copy link
Member Author

sirreal commented Sep 17, 2025

How can I test it?

I'll prepare an easy way to test this soon on WordPress.com. There's also the Jetpack Beta Tester plugin for testing on WordPress.com WP Cloud sites.

What's left to do?

I just got it building and working, so I need to review things myself and make sure it's finished and all working correctly 🙂

@sirreal sirreal added the [Type] Feature Development of a new feature label Sep 17, 2025
@sirreal sirreal requested a review from Copilot September 17, 2025 14:22

This comment was marked as outdated.

@sirreal sirreal force-pushed the feature/wpcom-code-block branch from 1941e55 to 382f884 Compare September 17, 2025 16:55
@sirreal sirreal requested a review from Copilot September 17, 2025 17:13

This comment was marked as outdated.

@sirreal sirreal requested a review from Copilot September 17, 2025 17:16

This comment was marked as outdated.

@sirreal sirreal requested a review from Copilot September 17, 2025 17:38

This comment was marked as outdated.

@sirreal sirreal requested a review from Copilot September 17, 2025 17:41

This comment was marked as outdated.

@sirreal sirreal force-pushed the feature/wpcom-code-block branch from 4dc1a27 to 0d87de7 Compare September 17, 2025 18:27
@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 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 (Jetpack or WordPress.com Site Helper), and enable the feature/wpcom-code-block branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack feature/wpcom-code-block
bin/jetpack-downloader test jetpack-mu-wpcom-plugin feature/wpcom-code-block

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

@jp-launch-control

This comment was marked as off-topic.

@sirreal sirreal requested a review from Copilot September 17, 2025 19:41

This comment was marked as outdated.

@sirreal sirreal added the I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage. label Sep 18, 2025
@sirreal sirreal force-pushed the feature/wpcom-code-block branch 3 times, most recently from f89f121 to 20b3dca Compare September 19, 2025 18:18
select and custom select use different options object and spread pass props through. prevent a "key" prop warning
@sirreal sirreal merged commit d222e4d into trunk Oct 2, 2025
87 checks passed
@sirreal sirreal deleted the feature/wpcom-code-block branch October 2, 2025 09:47
@github-actions github-actions bot removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Oct 2, 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. [mu wpcom Feature] Wpcom Blocks [Package] Jetpack mu wpcom WordPress.com Features [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Wpcomsh [Type] Feature Development of a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants