-
Notifications
You must be signed in to change notification settings - Fork 842
Social: Remove share limits logic and UI #46468
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
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! Social plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 6 files. Only the first 5 are listed here.
|
5d48ad3 to
38b8443
Compare
38b8443 to
cb42cfd
Compare
There was a problem hiding this 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 pull request removes the obsolete share limits logic and UI from Jetpack Social. The changes comprehensively eliminate all functionality related to enforcing sharing limits for free-tier users.
Key Changes
- Removed share limits enforcement logic and related PHP classes (
Share_Limits,Shares_Data_Controller) - Removed JavaScript/TypeScript components and selectors for displaying share usage statistics
- Cleaned up REST API endpoints, test files, and webpack configurations related to share limits
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
projects/plugins/social/src/class-jetpack-social.php |
Removed get_shares_info() and calculate_scheduled_shares() methods |
projects/plugins/social/tests/php/Jetpack_Social_Test.php |
Updated tests to remove mocking of deleted calculate_scheduled_shares() method |
projects/packages/publicize/src/class-share-limits.php |
Deleted entire class handling share limit enforcement |
projects/packages/publicize/src/rest-api/class-shares-data-controller.php |
Deleted REST API controller for shares data |
projects/packages/publicize/tests/php/Share_Limits_Test.php |
Deleted unit tests for share limits |
projects/packages/publicize/src/class-publicize-setup.php |
Removed init_sharing_limits() method and controller registration |
projects/packages/publicize/src/class-publicize-script-data.php |
Removed get_shares_data() method and unused Jetpack_Options import |
projects/packages/publicize/src/class-publicize-base.php |
Removed get_publicize_shares_info() and calculate_scheduled_shares() methods |
projects/packages/publicize/webpack.config.js |
Removed classic-editor-share-limits entry point |
projects/packages/publicize/src/js/classic-editor-share-limits.js |
Deleted classic editor share limits JavaScript |
projects/js-packages/publicize-components/src/types.ts |
Removed SharesData type definition |
projects/js-packages/publicize-components/src/social-store/types.ts |
Removed duplicate SharesData type definition |
projects/js-packages/publicize-components/src/social-store/selectors/shares-data.ts |
Deleted selectors for share limit data |
projects/js-packages/publicize-components/src/social-store/selectors/index.ts |
Removed import of deleted shares data selectors |
projects/js-packages/publicize-components/src/social-store/hydrate-stores.ts |
Removed entity registration for publicize/shares-data |
projects/js-packages/publicize-components/src/components/admin-page/header/index.js |
Removed stat cards display and related imports/selectors |
projects/js-packages/publicize-components/src/components/admin-page/header/stat-cards/ |
Deleted entire stat cards component directory |
projects/js-packages/publicize-components/src/utils/test-utils.js |
Removed shares_data from mock script data |
.phan/baseline.php files |
Updated static analysis baselines to reflect removed code |
changelog/ files |
Added changelog entries documenting the removal |
gmjuhasz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, I sanity tested it on my test sites and didn't run into any issues
Fixes SOCIAL-270
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: