Skip to content

Remove Pocket sharing service ahead of July 2025 shutdown #43795

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

Draft
wants to merge 8 commits into
base: trunk
Choose a base branch
from

Conversation

robertsreberski
Copy link
Contributor

Summary

Complete removal of the Pocket sharing service from Jetpack ahead of Mozilla's July 8, 2025 shutdown. This comprehensive implementation ensures graceful degradation for existing users while providing clear communication and alternative suggestions.

Test plan

  • Verify Pocket no longer appears in sharing settings UI
  • Confirm existing Pocket configurations degrade gracefully (buttons simply don't appear)
  • Check API endpoints handle missing Pocket service without errors
  • Validate sharing functionality works for all other services
  • Ensure user notice appears in sharing settings with alternatives
  • Test block editor sharing button variations exclude Pocket

Implementation Details

✅ Phase 1: Core Service Removal

  • Removed Share_Pocket class from sharing-sources.php
  • Updated get_all_services_names() to exclude Pocket
  • Clean removal from sharing service factory methods

✅ Phase 2: Frontend Assets Cleanup

  • Removed Pocket registration from sharedaddy.js
  • Cleaned up Pocket-specific CSS styling rules
  • Removed Pocket from sharing button styles

✅ Phase 3: Theme Integration Cleanup

  • Removed Pocket CSS from classic theme helper social-menu.css
  • Updated icon-functions.php to exclude Pocket from social links

✅ Phase 4: Assets and Configuration

  • Deleted Pocket SVG files from social logos infrastructure
  • Updated codepoints.json to remove Pocket font mappings
  • Removed Pocket from SVG sprites and documentation
  • Cleaned up block configurations and search terms

✅ Phase 5: Testing and Validation

  • Removed Pocket-specific AMP tests
  • Elegant graceful degradation leverages existing architecture
  • No database migrations needed - lightweight performance-friendly solution

✅ Phase 6: User Experience Considerations

  • Settings UI automatically removes Pocket from available services
  • Added prominent discontinuation notice with alternative suggestions
  • API endpoints, shortcodes, and widgets all degrade gracefully
  • Clean asset removal including orphaned image files

Key Technical Benefits

  1. Performance Optimized: No database migrations or upgrade slowdowns
  2. Graceful Degradation: Users with Pocket simply won't see the button anymore
  3. Architecture Leveraged: Used existing get_blog_services() filtering logic
  4. User Informed: Clear communication about discontinuation and alternatives
  5. Future-Proof: Clean removal without technical debt

The implementation ensures a smooth transition when Pocket shuts down, with no broken functionality and clear user guidance for alternatives.

Removes all core Pocket integration from Jetpack sharing functionality in preparation for Mozilla's Pocket service shutdown on July 8, 2025.
Removes all Pocket-specific CSS, SVG icons, and social widget configurations as part of Phase 2 cleanup ahead of Pocket service shutdown.
Removes remaining Pocket references from classic theme helper social menu components:
- Remove Pocket CSS styling rules from social-menu.css
- Remove Pocket domain mapping from icon-functions.php social links array

Part of Pocket service removal ahead of July 2025 shutdown.
Removes Pocket references from social logos infrastructure and block configurations:
- Delete Pocket SVG source file and clean up font codepoints
- Remove Pocket symbol from SVG sprite files
- Clean up Pocket references from official brand links documentation
- Remove "pocket" keyword from sharing buttons block configuration

Part of Pocket service removal ahead of July 2025 shutdown.
- Remove Pocket test from AMP support tests that would fail after removal
- Graceful degradation: Existing Pocket configurations are automatically hidden
- No database migration needed - sharing service logic skips undefined services
- Users with Pocket enabled will simply not see the button anymore
- Lightweight solution that doesn't impact site performance during upgrades

The sharing service architecture already handles missing services gracefully by
checking if the service exists before rendering (sharing-service.php:337).
Since Pocket class was removed, existing configurations degrade cleanly.

Completes Phase 5 of Pocket service removal plan.
Settings Cleanup:
- UI automatically removes Pocket from available services (already handled by service removal)
- Add prominent discontinuation notice on sharing settings page
- Provide alternative "read later" service suggestions (Instapaper, Raindrop.io, Readwise Reader)
- Notice shows for users with existing Pocket configurations or until August 2025

Backwards Compatibility:
- Sharing service architecture gracefully handles missing services
- API endpoints use get_blog_services() which skips undefined services
- No Pocket-specific shortcodes or widgets requiring special handling
- No deprecated functions needing notices (entire class was cleanly removed)
- Existing configurations degrade silently without breaking site functionality

Completes Phase 6 and finalizes comprehensive Pocket service removal.
- Delete smart-pocket.png and [email protected] (smart button graphics)
- Delete pocket.png and [email protected] (regular button graphics)
- These assets are no longer referenced after Pocket service removal
- CSS source maps still contain references but will be cleared on next build

Completes asset cleanup for Pocket service discontinuation.
@robertsreberski robertsreberski marked this pull request as draft June 5, 2025 13:55
Copy link
Contributor

github-actions bot commented Jun 5, 2025

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 or WordPress.com Site Helper), and enable the remove-pocket-service-SOCIAL-47 branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack remove-pocket-service-SOCIAL-47
bin/jetpack-downloader test jetpack-mu-wpcom-plugin remove-pocket-service-SOCIAL-47

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

Copy link
Contributor

github-actions bot commented Jun 5, 2025

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 a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • 🔴 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 🤖


🔴 Action required: Please include detailed testing steps, explaining how to test your change, like so:

## Testing instructions:

* Go to '..'
*

🔴 Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so:

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

My PR adds *x* and *y*.

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 Jun 5, 2025
Copy link

Code Coverage Summary

Coverage changed in 8 files. Only the first 5 are listed here.

File Coverage Δ% Δ Uncovered
projects/plugins/jetpack/modules/sharedaddy/sharing.php 0/422 (0.00%) 0.00% 29 💔
projects/plugins/jetpack/modules/sharedaddy/sharing-service.php 184/466 (39.48%) -0.13% 0 💚
projects/plugins/jetpack/modules/widgets/social-icons.php 389/539 (72.17%) -0.26% 0 💚
projects/packages/classic-theme-helper/src/social-menu/icon-functions.php 0/126 (0.00%) 0.00% -1 💚
projects/plugins/jetpack/extensions/blocks/sharing-button/sharing-button.php 0/187 (0.00%) 0.00% -1 💚

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.

/**
* Pocket sharing service.
*/
class Share_Pocket extends Sharing_Source {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of deleting the class altogether, I would recommend leveraging our Deprecated_Sharing_Source class, which will allow you to remove the button for visitors, while still displaying an invitation for site admins to remove the now deprecated service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Sharing Button [Block] Sharing Buttons Docs [Feature] Extra Sidebar Widgets [Feature] Sharing Post sharing, sharing buttons [Feature] Theme Tools [JS Package] Social Logos [Package] Classic Theme Helper [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ RNA [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Tests] Includes Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants