jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Newsletter settings: add toggle for showing a subscribe modal after commenting

Open simison opened this issue 1 year ago • 7 comments

Adds a missing toggle to Jetpack settings.

The toggle and feature is already available on WP.com sites and Calypso settings. The Dotcom team implementing this originally just didn't get to add the Jetpack side (convo), so this is a follow up to that.

Calypso newsletter settings:

image

Jetpack newsletter settings:

Screenshot 2024-06-20 at 13 55 01

After filling commenting field and submitting a comment:

Screenshot 2024-06-20 at 13 53 03

You will see a modal pop-up prefilled with the email you used for commenting:

Screenshot 2024-06-20 at 13 52 23

Proposed changes:

  • Release "show subscribe modal after commenting" feature to Jetpack sites; previously it was available only for WP.com sites.

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:

  • See PR description

simison avatar Jun 04 '24 12:06 simison

Thank you for your PR!

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

  • :white_check_mark: Include a description of your PR changes.
  • :white_check_mark: Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • :white_check_mark: Add testing instructions.
  • :white_check_mark: Specify whether this PR includes any changes to data or privacy.
  • :white_check_mark: 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 :robot:


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 August 6, 2024 (scheduled code freeze on July 29, 2024).

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

github-actions[bot] avatar Jun 04 '24 12:06 github-actions[bot]

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 update/subscribe-toggle-comment-form branch.

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

    bin/jetpack-downloader test jetpack update/subscribe-toggle-comment-form
    

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[bot] avatar Jun 04 '24 12:06 github-actions[bot]

Removed couple "is Atomic" checks and added template edit/preview link.

simison avatar Jun 04 '24 12:06 simison

Needs more work, as currently results in error:

Screenshot 2024-06-04 at 14 52 44

@pkuliga can you spot what's missing for the toggle to work on Jetpack site? By the looks the option seems to be available.

Looks like this fixed it for saving the setting at least.

simison avatar Jun 04 '24 12:06 simison

@lupus2k, I'm a bit confused by appSource being atomic-subscription-modal-lo here, but in the event (wpcom_blog_email_subscribe) and Superset dashboards I see verbum-subscription-modal?

https://github.com/Automattic/jetpack/blob/2cbe96b1ce539b642244bb9a54e05d95a32c90ac/projects/plugins/jetpack/modules/comments/subscription-modal-on-comment/class-jetpack-subscription-modal-on-comment.php#L151

simison avatar Jun 20 '24 11:06 simison

@lupus2k, I'm a bit confused by appSource being atomic-subscription-modal-lo here, but in the event (wpcom_blog_email_subscribe) and Superset dashboards I see verbum-subscription-modal?

https://github.com/Automattic/jetpack/blob/2cbe96b1ce539b642244bb9a54e05d95a32c90ac/projects/plugins/jetpack/modules/comments/subscription-modal-on-comment/class-jetpack-subscription-modal-on-comment.php#L151

We have more detailed track events in the P2 here: pb5gDS-3tB-p2

As Jetpack uses subscribe.wordpress.com/memberships/ to subscribe the user and, in some cases, does not detect that the user was logged in due to cookie blocking (like Enhanced tracking protection in Firefox), causing wrong tracking events, we decided to pass the information about the login-status using app_source

lupus2k avatar Jun 20 '24 14:06 lupus2k

@heavyweight I was looking into this again and this time I'm seeing an issue in incognito Chrome & Safari.

Unhandled Promise Rejection: ForbiddenError: Not Authorized verbum-comments.js

Screenshot 2024-07-02 at 15 06 21

Do you know if that's the same problem you fixed elsewhere earlier?

simison avatar Jul 02 '24 12:07 simison

@heavyweight I was looking into this again and this time I'm seeing an issue in incognito Chrome & Safari.

Unhandled Promise Rejection: ForbiddenError: Not Authorized verbum-comments.js

Screenshot 2024-07-02 at 15 06 21

Do you know if that's the same problem you fixed elsewhere earlier?

It's hard to tell. This is an error when checking if the user is authenticated/logged in. It's completely normal to get that status when you are not logged in. But if you are already logged in that would indicate potential cookie issues. In anyway it's not PR related for sure.

heavyweight avatar Jul 03 '24 14:07 heavyweight

This PR has been marked as stale. This happened because:

  • It has been inactive for the past 3 months.
  • It hasn’t been labeled `[Pri] BLOCKER`, `[Pri] High`, etc.

If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation.

If the PR is not updated (or at least commented on) in another month, it will be automatically closed.

github-actions[bot] avatar Oct 02 '24 00:10 github-actions[bot]

This PR has been automatically closed as it has not been updated in some time. If you want to resume work on the PR, feel free to restore the branch and reopen the PR.

github-actions[bot] avatar Nov 03 '24 00:11 github-actions[bot]