Skip to content

Fix manual sharing message template rendering#50290

Open
haqadn wants to merge 3 commits into
trunkfrom
social-520-bug-manual-sharing-on-social-doesnt-replace-the-tokens-with
Open

Fix manual sharing message template rendering#50290
haqadn wants to merge 3 commits into
trunkfrom
social-520-bug-manual-sharing-on-social-doesnt-replace-the-tokens-with

Conversation

@haqadn

@haqadn haqadn commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fixes SOCIAL-520

Proposed changes

  • Render manual sharing messages through the Publicize render-messages flow when message templates are enabled, falling back to token-free title text while rendering is unavailable.
  • Avoid duplicating URLs when rendered text already contains the post link and keep legacy behavior when templates are disabled.
  • Add focused hook tests and a Publicize changelog entry.

Related product discussion/links

  • N/A

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

No.

Testing instructions

  1. Checkout the WPCOM PR: 227053-ghe-Automattic/wpcom in your sandbox
  2. Instruct your jetpack test site to use the sandbox
  3. Upgrade social to pro to enable message templates
  4. Try manual sharing any post from the social sidebar in editor
  5. Make sure that the template is rendered properly

Screenshot of it working

image

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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), and enable the social-520-bug-manual-sharing-on-social-doesnt-replace-the-tokens-with branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack social-520-bug-manual-sharing-on-social-doesnt-replace-the-tokens-with

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

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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 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!

@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 Jul 7, 2026
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/packages/publicize/_inc/utils/render-messages.ts 9/10 (90.00%) 1.11% 0 💚
projects/packages/publicize/_inc/components/share-buttons/useShareButtonText.ts 17/21 (80.95%) 80.95% -10 💚

1 file is newly checked for coverage.

File Coverage
projects/packages/publicize/_inc/hooks/use-manual-share-message/index.ts 26/32 (81.25%) 💚

Full summary · PHP report · JS report

haqadn and others added 2 commits July 7, 2026 16:56
…l-sharing-on-social-doesnt-replace-the-tokens-with
…oad-bearing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@haqadn haqadn self-assigned this Jul 7, 2026
@haqadn haqadn marked this pull request as ready for review July 7, 2026 23:26
@haqadn haqadn requested a review from a team July 7, 2026 23:27
@haqadn haqadn added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant