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

Subscriptions: Adapt message based on Publicize status #28867

Closed

Conversation

danielbachhuber
Copy link
Contributor

@danielbachhuber danielbachhuber commented Feb 9, 2023

From p1675793272904399-slack-C9EJ7KSGH
Related #28725

Proposed changes:

Adapts the 'Newsletter' panel message based on whether the post will be shared on social.

Publicize enabled
image

Publicize disabled

image

Publicize disabled post-publish

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

See p1675793272904399-slack-C9EJ7KSGH

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

N/A

Testing instructions:

  1. Sandbox a Site with a Business plan.
  2. Run jetpack build plugins/jetpack and jetpack rsync jetpack <host> to sync the change to your sandbox.
  3. Remove all Publicize connections and verify the message appears as expected ('This post will reach 1 subscriber and wonʼt be shared on social.')
  4. Add a Publicize connection and verify the message appears as expected ('This post will reach 1 subscriber and 482 social followers.').
  5. Disable the Publicize connection, publish the post, and verify the message appears as expected ('This post was shared to 1 subscriber.')

@danielbachhuber danielbachhuber added [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Status] Needs Team Review labels Feb 9, 2023
@danielbachhuber danielbachhuber requested a review from a team February 9, 2023 15:02
@danielbachhuber danielbachhuber self-assigned this Feb 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run

bin/jetpack-downloader test jetpack improve/newsletter-panel-social-message

to get started. More details: p9dueE-5Nn-p2

@github-actions github-actions bot added [Block] Subscriptions [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Feb 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

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.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ 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.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") 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 you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: March 7, 2023.
  • Scheduled code freeze: February 28, 2023.

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.

Tests are failing at the moment so we will not be able to merge this :(
Although they're not related to your change, I guess you're the first one touching the Subscribe block since that error was added in.
Related: #20357

      You tried to opt-in to unstable APIs as module "@wordpress/block-editor" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.
 3 | import { serialize } from '@wordpress/blocks';
4 | import { select, dispatch } from '@wordpress/data';
5 | import { store as editorStore } from '@wordpress/editor';
               | ^
6 | import { flatMap, throttle } from 'lodash';
7 | import { SUPPORTED_CONTAINER_BLOCKS } from '../components/twitter';
8 |

Copy link
Contributor

@TimBroddin TimBroddin left a comment

Choose a reason for hiding this comment

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

I tested this and this works as intended. Nice job @danielbachhuber!

@danielbachhuber
Copy link
Contributor Author

Tests are failing at the moment so we will not be able to merge this :(
Although they're not related to your change, I guess you're the first one touching the Subscribe block since that error was added in.

@jeherve Is that a blocking failure? Can we silence it for now, and handle in a follow-up PR?

@jeherve
Copy link
Member

jeherve commented Feb 14, 2023

Is that a blocking failure? Can we silence it for now, and handle in a follow-up PR?

The test is a required one, yes, and it started failing with your PR since you're bringing in a new dependency that relies on @wordpress/editor. I'm not sure if there is something we can do to shrortcircuit things, either in the test or on the codebase.

@danielbachhuber
Copy link
Contributor Author

danielbachhuber commented May 4, 2023

Some additional conversation in Slack p1682979912865289-slack-C9EJ7KSGH

@danielbachhuber
Copy link
Contributor Author

Punting on this.

@danielbachhuber danielbachhuber deleted the improve/newsletter-panel-social-message branch May 17, 2023 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Subscriptions [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants