-
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
Social: Add connection management to the admin page #37120
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. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. 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. 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?
|
projects/plugins/social/src/js/components/social-module-toggle/index.tsx
Outdated
Show resolved
Hide resolved
const isActive = this.props.getOptionValue( 'publicize' ); | ||
// Reload the page if Publicize is enabled. | ||
if ( isActive && ! window.Initial_State.socialInitialState.is_publicize_enabled ) { | ||
window.location.reload(); |
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 seems like a reasonable solution for now. We can work on making API calls for the initial state (if we want to) in the coming weeks.
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.
Yes, Sid created a task to work on the backend parts of it - https://github.com/Automattic/jetpack-reach/issues/310
* Prepare backend aggregation * Update store to use new format * Add component * Update get_profile_link method * changelog * Revert "Prepare backend aggregation" This reverts commit b6d9c52. * Restore 'profile_link' prop * Use feature flag * Fixup versions * Create get_initial_state helper in publicize and use it in Jetpack and Social * Restore admin page hasConnection logic * Fix the connection management for Jetpack and Social admin page * Restore connectionRefreshPath * Fix stylelints * Fix the connection-test-results endpoint * Fix PHP unit tests * Replace deprecated method in tests * Fix mocking for PHP 7 * Fix critical error * No mocking needed now * Set initial state only if publicize is enabled and setup * Reload settings page if publicize is enabled * Use connection package instead of Jetpack class --------- Co-authored-by: Manzoor Wani <[email protected]>
Fixes https://github.com/Automattic/jetpack-reach/issues/294
Proposed changes:
ConnectionManagement
component ece8d5fget_profile_link
function in base so it handles our new services too 312e2e4Other information:
Jetpack product discussion
https://github.com/Automattic/jetpack-reach/issues/294
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
You can switch between the new and old UI with
define( 'JETPACK_SOCIAL_USE_ADMIN_UI_V1', true );
in your wp-config filetest
endpoint finishesJetpack settings page
Social settings page