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

Move wpcomsh widgets into jetpack-mu-wpcom #43046

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

jeryj
Copy link
Contributor

@jeryj jeryj commented Apr 11, 2025

Proposed changes:

  • Moves widgets from wpcomsh into jetpack-mu-wpcom as part of a move to get all widgets into one codebase
  • There should be no functionality changes

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:

Testing on Atomic:

Note, if anything is broken with a widget during testing, make sure it's not also broken on trunk.

  • Open a Tab on your base Atomic site without this PR applied.
  • Open a new tab on your Atomic site
  • Go to Jetpack > Jetpack Beta, select WordPress.com Site Helper, and enable the update/consolidate-wpcomsh-widgets branch.
  • Activate a site that uses the Widgets editor such as Twenty Twenty
  • Go to /wp-admin/widgets.php
  • Add a Legacy Widget Block to both your Atomic tabs
  • The same options for Legacy Widgets should be available on both pages
  • SSH into your atomic sandbox and run:
    • vim ~/htdocs/wp-content/mu-plugins/wpcomsh-dev/jetpack_vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-widgets/wpcom-widgets.php
    • Comment out all the retired widgets array in JETPACK_MU_WPCOM_RETIRED_WIDGETS so it's an empty array
  • Reload your test page
  • Add the retired widgets to your page to check they still work
  • Save your widgets (Update)
  • Check the frontend
  • Now add all the retired widgets back into the retired widget array:
    • vim ~/htdocs/wp-content/mu-plugins/wpcomsh-dev/jetpack_vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-widgets/wpcom-widgets.php
  • Reload the Widget page
  • The legacy widgets should still be present on in your widget area
  • The legacy widgets should be visible on the frontend of the site
  • Add a new Legacy Block
  • The retired widgets should NOT be available in the Legacy Block dropdown
  • Reset your atomic site by removing this PR from your Beta Testing plugin
  • Reload your Widget page
  • All widgets should load
  • All widgets should be visible on the frontend of the site

Testing on WPcom

There should be no need, as all the additions are wrapped in an IS_ATOMIC check

Copy link
Contributor

github-actions bot commented Apr 11, 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 update/consolidate-wpcomsh-widgets branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/consolidate-wpcomsh-widgets

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

Copy link
Contributor

github-actions bot commented Apr 11, 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!


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 Apr 11, 2025
Copy link

jp-launch-control bot commented Apr 11, 2025

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/jetpack-mu-wpcom/src/features/wpcom-widgets/wpcom-widgets.php 0/46 (0.00%) 0.00% 14 💔
projects/plugins/wpcomsh/wpcomsh.php 107/304 (35.20%) 1.44% -13 💚

14 files are newly checked for coverage. Only the first 5 are listed here.

File Coverage
projects/packages/jetpack-mu-wpcom/src/features/wpcom-widgets/author-grid/class-widget-authors-grid.php 0/110 (0.00%) 💔
projects/packages/jetpack-mu-wpcom/src/features/wpcom-widgets/category-cloud/class-wpcom-category-cloud-widget.php 0/122 (0.00%) 💔
projects/packages/jetpack-mu-wpcom/src/features/wpcom-widgets/freshly-pressed/class-wpcom-freshly-pressed-widget.php 0/52 (0.00%) 💔
projects/packages/jetpack-mu-wpcom/src/features/wpcom-widgets/gravatar/class-gravatar-widget.php 0/172 (0.00%) 💔
projects/packages/jetpack-mu-wpcom/src/features/wpcom-widgets/i-voted/class-jetpack-i-voted-widget.php 0/3 (0.00%) 💔

Full summary · PHP report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[mu wpcom Feature] Wpcom Widgets [Package] Jetpack mu wpcom WordPress.com Features [Plugin] Wpcomsh [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant