jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Social: Refactor the resharing feature and add it to Jetpack Social

Open pablinos opened this issue 3 years ago • 3 comments

Changes proposed in this Pull Request:

This moves some components and hooks from Jetpack to the publicize-components package, and refactors the code, so the resharing feature's API can be added to Jetpack Social.

It also changes the logic, so that resharing is enabled for sites that have the sharing limit feature flag.

Other information:

  • [ ] Have you written new tests for your changes, if applicable?
  • [x] Have you checked the E2E test CI results, and verified that your changes do not break them?

Jetpack product discussion

p1HpG7-gqr-p2

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

No

Testing instructions:

This makes changes to the Jetpack plugin (so also WordPress.com, but there's some work needed to sync the change) and the Jetpack Social Plugin.

Jetpack

With the Jetpack Social feature enabled:

  • Check that the form in the block editor sidebar still works as expected and a post is shared to any enabled social media connections.
  • Check that a post can be saved by a Collaborator
  • With a published post check that:
    • The message is shown saying that resharing is a paid feature.
    • If the site has a paid plan or the publicize-share-limit feature flag, then the site can reshare the post from the editor sidebar.
    • Without the feature enabled and with the nudge filter added ( add_filter( 'jetpack_block_editor_enable_upgrade_nudge', '__return_true' ); added to the site) then an upgrade nudge is displayed that links to buy a plan.
image image image
Jetpack without a plan Jetpack without a plan but with nudges enabled Jetpack with a paid plan
Jetpack Social

Similar to above:

  • Check that the form is shown on a new post in the Jetpack Social sidebar, and that a post is shared to any enabled connections when it is published.
  • Check that a post can be saved by a Collaborator
  • With a published post check that:
    • A message is displayed saying that posts can only be shared as they are published.
    • If the site has the publicize-share-limit feature flag, then the site has the reshare UI in the editor sidebar. This won't be functional until #26028 is merged.
image image
Social plugin without the feature enabled Social plugin with the share-limit feature flag

pablinos avatar Sep 01 '22 17:09 pablinos

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.
  • :warning: All commits were linted before commit.
  • :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 (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: November 1, 2022.
  • Scheduled code freeze: October 25, 2022.

Social plugin:

  • Next scheduled release: November 2, 2022.
  • Scheduled code freeze: October 26, 2022.

github-actions[bot] avatar Sep 01 '22 17:09 github-actions[bot]

When the blog sticker is enabled, I am able to re-share without having a paid plan on Jetpack.

Yes, that's the correct behaviour. With sharing limits in place Jetpack should function like Jetpack Social.

pablinos avatar Sep 06 '22 09:09 pablinos

Are you an Automattician? You can now test your Pull Request on WordPress.com. On your sandbox, run bin/jetpack-downloader test jetpack update/republicize-availability to get started. More details: p9dueE-5Nn-p2

github-actions[bot] avatar Sep 21 '22 10:09 github-actions[bot]

We'd very much like to get this into 11.5, so I've added it to the milestone.

pablinos avatar Oct 22 '22 11:10 pablinos

Jetpack without a plan but with nudges enabled

I'm very late to this party, and that may not be something worth worrying about at the moment since nudges are still disabled by default on self-hosted sites, but should we fix the required plan mentioned in that nudge? Since the Premium plan doesn't exist anymore, maybe we shouldn't mention it there?

jeherve avatar Dec 06 '22 11:12 jeherve

but should we fix the required plan mentioned in that nudge? Since the Premium plan doesn't exist anymore, maybe we shouldn't mention it there?

Yes, we probably should, but we're about to make resharing part of the free plan for all sites, so nobody should see it.

pablinos avatar Dec 07 '22 16:12 pablinos