-
Notifications
You must be signed in to change notification settings - Fork 846
Social: Replace the resharing upgrade nudge with the core Notice component with action #46335
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
Resharing has been made available to all sites except Simple free sites, and thus, this condition is no longer used.
|
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! |
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 PR refactors the Publicize resharing upgrade notice to use WordPress's core Notice component instead of a custom implementation, improving code maintainability and consistency.
Key Changes:
- Replaced custom upgrade notice with WordPress core
Noticecomponent with action button - Removed the
isRePublicizeUpgradableViaUpsellcondition check from the UpsellNotice component (note: this property is still used in other components) - Simplified the component logic by removing platform-specific rendering and external link documentation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| projects/js-packages/publicize-components/src/components/panel/upsell.tsx | Refactored UpsellNotice component to use WordPress core Notice component with action button, removed custom markup, and simplified conditional logic |
| projects/js-packages/publicize-components/changelog/fix-social-resharing-upgrade-notice | Added changelog entry documenting the change as a patch-level update |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Coverage SummaryCoverage changed in 1 file.
|
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.
It uses core now, altough that button looks a bit odd imo, I wonder if we could make it better 🤔
I already added a note to the PR about the improvement in Core for the spacing for those actions. |
On Simple sites with a free plan, resharing is not available and an upgrade notice is shown. This notice does not use the Core Notice component. It rather uses some custom component.
Completes SOCIAL-275
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Note: The spacing for the core Notice has already been fixed in #69430 and should be automatically be available in the next Gutenber/Core release.
