-
Notifications
You must be signed in to change notification settings - Fork 800
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
Unbundle Social JS code from Jetpack and Social #38330
Conversation
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Search plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Social plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
0070129
to
8126aae
Compare
projects/js-packages/webpack-config/changelog/update-unbundle-publicize-from-jetpack
Outdated
Show resolved
Hide resolved
projects/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-react-page.php
Outdated
Show resolved
Hide resolved
This is looking reasonable to me now. 👍 I'll leave final review for the Reach team. |
Yeah, this is blocked by publicize initial state refactor. We will come back to this once that is done. |
We at @Automattic/jetpack-reach have decided to deprioritize this for now and come back later. |
Currently, the JS code of social that gets bundled in Jetpack takes precedence over Social even if Social is the latest version. This makes it difficult to fix a bug in Jetpack given the monthly release cycle. Thus we should explore ways to ensure that the JS code is not dependent upon what has been bundled with the plugin. The latest version of the JS code should be used if it's present in any of the plugins.
P2 post: pdWQjU-Mc-p2
This PR is a proof of concept to test unbundling of publicize and the related JS code/logic from both Jetpack and Social plugin. This moves the JS bundling from Jetpack/Social to the publicize package to ensure that the latest version of the code is always loaded regardless of which plugin is active.
Proposed changes:
Approach/idea
The basic idea is to make Jetpack independent of
js-packages/publicize-components
package and rather depend uponpublicize
package. So, if Jetpack or Social needs to render something common frompublicize-components
, it must be exported via publicize package. The Social specific code like the admin page may remain in Social plugin itself, i.e. it may consumepublicize-components
.The publicize package will export the shared components via its own bundle on runtime just like WP core components and other packages.
This will ensure that we will always have the latest version of publicize UI both in Jetpack and Social.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
jetpack watch ...
command running for any pluginpnpm install
jepack build plugins/social
andjetpack build plugins/jetpack
jetpack build packages/publicize
'Connect an account'
to something else inpublicize-components/src/components/connection-management/index.tsx
, e.g.'Connect a social account'
jetpack build packages/publicize
jepack build plugins/social
andjetpack build plugins/jetpack