Skip to content

Likes: display notice and link when you could use a Like block instead of the legacy Like butttons#46726

Merged
jeherve merged 14 commits intotrunkfrom
add/extract-block-theme-notice
Jan 28, 2026
Merged

Likes: display notice and link when you could use a Like block instead of the legacy Like butttons#46726
jeherve merged 14 commits intotrunkfrom
add/extract-block-theme-notice

Conversation

@jeherve
Copy link
Copy Markdown
Member

@jeherve jeherve commented Jan 22, 2026

Part of #46671

Proposed changes:

  • Extract the block theme notice from ShareButtons into a new reusable BlockThemeNotice component
  • Add the block theme notice to the Likes settings card for users on block-based themes, matching the existing notice that was displayed for the sharing buttons.
  • Add a link to configure your Like block in the site editor, when you use a block theme.

Before

Screenshot 2026-01-23 at 16 57 44

After

Screenshot 2026-01-23 at 16 56 57

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?

No changes to tracking or data usage.

Testing instructions:

  1. Activate a block-based theme (e.g., Twenty Twenty-Four)
  2. Go to Jetpack → Settings → Sharing
  3. Verify the "Sharing buttons" card shows the blue info notice suggesting to use the Sharing block
  4. Toggle the sharing buttons on/off and verify the notice text changes appropriately
  5. Verify the "Like buttons" card now also shows the blue info notice suggesting to use the Like block, as well. as a link to the site editor
  6. Toggle the Like buttons on/off and verify the notice text changes appropriately
  7. Switch to a classic theme (e.g., Twenty Twenty-One)
  8. Verify neither card shows the block theme notice

@jeherve jeherve added the [Status] Needs Review This PR is ready for review. label Jan 22, 2026
Copilot AI review requested due to automatic review settings January 22, 2026 14:33
@jeherve jeherve self-assigned this Jan 22, 2026
@jeherve jeherve added [Status] In Progress Enhancement [Feature] Likes Admin Page React-powered dashboard under the Jetpack menu [Block] Like [Pri] Normal and removed [Status] Needs Review This PR is ready for review. labels Jan 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 22, 2026

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 add/extract-block-theme-notice branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/extract-block-theme-notice

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 added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Tests] Includes Tests labels Jan 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 22, 2026

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!


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: February 3, 2026
    • Code freeze: February 3, 2026

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

@jeherve jeherve force-pushed the add/extract-block-theme-notice branch from 26758cf to b2fb54b Compare January 22, 2026 14:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extracts the block theme notice from the ShareButtons component into a reusable BlockThemeNotice component and applies it to both the Sharing and Likes settings cards. The refactoring follows the DRY principle while also fixing a typo in the original text.

Changes:

  • Created a new reusable BlockThemeNotice component with accompanying tests
  • Added isLikeBlockAvailable to Redux state management (mirroring the existing isSharingBlockAvailable pattern)
  • Applied the block theme notice to the Likes settings card for users on block-based themes

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
projects/plugins/jetpack/changelog/extract-block-theme-notice Adds changelog entry for the enhancement
projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php Adds isLikeBlockAvailable to Redux initial state following existing pattern
projects/plugins/jetpack/_inc/client/state/initial-state/reducer.js Adds isLikeBlockAvailable selector function
projects/plugins/jetpack/_inc/client/sharing/share-buttons.jsx Refactors to use new BlockThemeNotice component, removes duplicated code
projects/plugins/jetpack/_inc/client/sharing/likes.jsx Adds block theme notice to Likes settings
projects/plugins/jetpack/_inc/client/sharing/index.jsx Connects isLikeBlockAvailable state to component props
projects/plugins/jetpack/_inc/client/components/block-theme-notice/test/component.js Adds comprehensive tests for the new component
projects/plugins/jetpack/_inc/client/components/block-theme-notice/index.jsx New reusable component for displaying block theme notices

@github-actions github-actions Bot added the Docs label Jan 22, 2026
Copilot AI review requested due to automatic review settings January 22, 2026 14:44
@jeherve jeherve force-pushed the add/extract-block-theme-notice branch from 812a60e to d800883 Compare January 22, 2026 14:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread projects/plugins/jetpack/_inc/client/components/block-theme-notice/index.jsx Outdated
@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented Jan 22, 2026

Code Coverage Summary

Coverage changed in 5 files.

File Coverage Δ% Δ Uncovered
projects/plugins/jetpack/_inc/client/sharing/likes.jsx 0/11 (0.00%) 0.00% 7 💔
projects/plugins/jetpack/_inc/client/state/initial-state/reducer.js 58/119 (48.74%) -0.41% 1 ❤️‍🩹
projects/plugins/jetpack/_inc/lib/admin-pages/class-jetpack-redux-state-helper.php 161/272 (59.19%) 0.30% 0 💚
projects/plugins/jetpack/_inc/client/components/notice/index.jsx 22/29 (75.86%) 6.90% -2 💚
projects/plugins/jetpack/_inc/client/sharing/share-buttons.jsx 0/19 (0.00%) 0.00% -2 💚

1 file is newly checked for coverage.

File Coverage
projects/plugins/jetpack/_inc/client/components/block-theme-notice/index.jsx 4/4 (100.00%) 💚

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

…tice/index.jsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings January 22, 2026 15:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread projects/plugins/jetpack/changelog/extract-block-theme-notice
When a block theme is active and the Like block is available,
show a "Configure your Like buttons" link that directs users
to the site editor where they can add the block to their templates.
Copilot AI review requested due to automatic review settings January 23, 2026 15:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@jeherve jeherve added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Jan 23, 2026
@jeherve jeherve requested a review from a team January 23, 2026 15:59
@jeherve jeherve changed the title Sharing: Extract block theme notice into reusable component Likes: display notice and link when you could use a Like block instead of the legacy Like butttons Jan 23, 2026
Copy link
Copy Markdown
Member

@arcangelini arcangelini left a comment

Choose a reason for hiding this comment

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

Settings in Jetpack are hard for me because they are not 1 for 1 across self-hosted, atomic, and simple sites so please correct me if I missed something.

Simple

I was not able to find Jetpack ⇢ Settings ⇢ Sharing instead I ended up in /wp-admin ⇢ Settings ⇢ Sharing where I didn't see the changes reflected. This probably needs a wpcom patch? If this is the only way to toggle this setting on Simple sites it should be accounted for I believe. I guess we would just put it below the selector?

Screen Shot 2026-01-27 at 11 19 27

Atomic

Tested with block theme and without and it worked well. Not sure if its supposed to show up in the same place as Simple, but it says nothing about Like buttons in wp-admin/options-general.php?page=sharing... not related to this PR I think.

Screen Shot 2026-01-27 at 11 38 37 Screen Shot 2026-01-27 at 11 41 34

@jeherve
Copy link
Copy Markdown
Member Author

jeherve commented Jan 28, 2026

I was not able to find Jetpack ⇢ Settings ⇢ Sharing instead I ended up in /wp-admin ⇢ Settings ⇢ Sharing where I didn't see the changes reflected.

Yes, the screens are different ; the Jetpack > Settings > Sharing screen is Jetpack-only, and has no equivalent on simple sites.

Settings > Sharing is available in all environments, includes some notices and logic for block themes, but would also benefit from a redesign. That's for another PR though, it's outside of the scope of the problem I'm addressing here.

I'll merge this for now, we can revisit the Settings > Sharing screen improvements in the future.

@jeherve jeherve merged commit 1db099f into trunk Jan 28, 2026
79 of 83 checks passed
@jeherve jeherve deleted the add/extract-block-theme-notice branch January 28, 2026 09:06
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label Jan 28, 2026
@github-actions github-actions Bot added this to the jetpack/15.5 milestone Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu [Block] Like Docs [Feature] Likes [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] Normal [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants