-
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: Create a social service connect button #37196
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. 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?
|
@@ -266,6 +268,20 @@ public function initial_state() { | |||
return $state; | |||
} | |||
|
|||
public function get_services() { | |||
$site_id = Connection_Manager::get_site_id(); |
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 API call should probably be cached, so we're not making another API request on each load of the admin page, especially as this data will not change very often
projects/plugins/social/src/js/components/social-module-toggle/index.tsx
Outdated
Show resolved
Hide resolved
projects/plugins/social/src/js/components/social-module-toggle/index.tsx
Outdated
Show resolved
Hide resolved
projects/js-packages/publicize-components/src/components/connect-button/index.js
Outdated
Show resolved
Hide resolved
This is currently a proof of concept where we get the available external services and render a connect button, which in turn triggers the authentication flow for each service. To test it, the site must be sandboxed with D146389-code applied.
81e44f8
to
b8d5b9b
Compare
projects/packages/publicize/src/jetpack-social-settings/class-settings.php
Outdated
Show resolved
Hide resolved
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 is working well for me apart from the problem we're discussing with Tumblr. Just a comment about the available services
...packages/publicize-components/src/components/add-connection-modal/use-supported-services.tsx
Show resolved
Hide resolved
It says WPCOM tests are failing, maybe that's ok? Also, should we do a sanity check on WPCOM as well with this patch and make sure the editor loads? |
This is currently a proof of concept where we get the available external services and render a connect button, which in turn triggers the authentication flow for each service.
To test it, the site must be sandboxed with D146389-code applied.
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Screen.Recording.2024-05-09.at.6.38.48.PM.mov