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

Add subscribers in wp-admin starting page #42066

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

Conversation

jorgefilipecosta
Copy link
Member

Extracted from #42033.

This PR replaces the subscriber's link to Jetpack Cloud with a starting page for subscribers rendered with React.
The idea is to make things easier to review. This PR just contains what is required to have a menu item render a page with react.
The replacement of the external link with the new wp-admin-based page just happens when the jetpack_wp_admin_subscriber_management_enabled feature flag is active.

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

No

Testing instructions:

Build the jetpack plugin to verify we keep exactly the current behavior of linking to the jetpack cloud when accessing subscribers as is.
Enabeed the jetpack_wp_admin_subscriber_management_enabled experiment by adding this code snippet:
add_filter( 'jetpack_wp_admin_subscriber_management_enabled', '__return_true' );
Verify subscribers now render a page saying "Hello world!" instead of a link to the jetpack cloud.

@jorgefilipecosta jorgefilipecosta added [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Block] Subscriptions [Package] Subscribers labels Feb 26, 2025
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Feb 26, 2025
Copy link
Contributor

github-actions bot commented Feb 26, 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 🤖


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.


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!


Jetpack plugin:

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

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: March 4, 2025
    • Code freeze: March 3, 2025

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


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 Feb 26, 2025
Copy link
Contributor

github-actions bot commented Feb 26, 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 add/subscribers-in-wp-admin-page branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/subscribers-in-wp-admin-page
bin/jetpack-downloader test jetpack-mu-wpcom-plugin add/subscribers-in-wp-admin-page

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

@jorgefilipecosta jorgefilipecosta changed the title Add subscribers in wpadmin starting page Add subscribers in wp-admin starting page Feb 26, 2025
Copy link

jp-launch-control bot commented Feb 26, 2025

Code Coverage Summary

Coverage changed in 6 files. Only the first 5 are listed here.

File Coverage Δ% Δ Uncovered
projects/packages/jetpack-mu-wpcom/src/features/wpcom-admin-menu/wpcom-admin-menu.php 0/290 (0.00%) 0.00% 3 ❤️‍🩹
projects/packages/masterbar/src/admin-menu/class-atomic-admin-menu.php 110/204 (53.92%) -0.53% 2 ❤️‍🩹
projects/packages/masterbar/src/admin-menu/class-jetpack-admin-menu.php 42/114 (36.84%) -0.09% 2 ❤️‍🩹
projects/packages/masterbar/src/admin-menu/class-wpcom-admin-menu.php 43/197 (21.83%) 0.18% 2 ❤️‍🩹
projects/plugins/jetpack/modules/subscriptions.php 46/401 (11.47%) 0.39% 2 ❤️‍🩹

3 files are newly checked for coverage.

File Coverage
projects/packages/subscribers-dashboard/src/class-dashboard.php 15/32 (46.88%) ❤️‍🩹
projects/packages/subscribers-dashboard/_inc/admin.jsx 6/7 (85.71%) 💚
projects/packages/subscribers-dashboard/global.d.ts 0/0 (—%) 🤷

Full summary · PHP report · JS report

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

👋 Quick drive-by to ask about the package name. If the package eventually comes to include more subscription-related features, what do you think about naming it "subscriptions"?

If it will only include the dashboard, should it be named "subscribers-dashboard"?

@arcangelini
Copy link
Contributor

I was not successful in getting this to work. I think maybe I wasn't setting it up correctly. So I can't comment yet on the functionality of this PR.

One question I do have is if this is the best place to put the subscriber stuff. I ask because I think we have a few other pieces for the Newsletter and subscriptions that exist in different places. For example we started building a widget that exists inside subscription modules directly. I am not super knowledgable about the architecture of Jetpack so I can't say for sure your decision is not ideal. As I mentioned this is just a question with some additional context.

Thanks again for all this work. 💯

@jorgefilipecosta jorgefilipecosta force-pushed the add/subscribers-in-wp-admin-page branch from 4fea861 to eec83ba Compare February 27, 2025 14:49
@jorgefilipecosta jorgefilipecosta force-pushed the add/subscribers-in-wp-admin-page branch from c8b3ab0 to 77828d6 Compare February 27, 2025 15:13
@github-actions github-actions bot added the [Plugin] mu wpcom jetpack-mu-wpcom plugin label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Subscriptions [Feature] Masterbar WordPress.com Toolbar and Dashboard customizations [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [mu wpcom Feature] Wpcom Admin Menu [Package] Jetpack mu wpcom WordPress.com Features [Package] Masterbar [Package] Subscribers Dashboard [Package] Subscribers [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Plugin] mu wpcom jetpack-mu-wpcom plugin [Plugin] Wpcomsh [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Tests] Includes Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants