Use the new Jetpack Social connection on AbstractPost#25587
Open
crazytonyli wants to merge 7 commits into
Open
Use the new Jetpack Social connection on AbstractPost#25587crazytonyli wants to merge 7 commits into
crazytonyli wants to merge 7 commits into
Conversation
Bridge the JetpackSocial v2 connection model to the WP.com REST v1.x post-editing path by reading and writing per-connection sharing state as `_wpas_skip_publicize_<connection_id>` and `_wpas_mess` post metadata.
Source the `_wpas_skip_publicize_*` and `_wpas_mess` upload entries from the post's metadata container and stop emitting them from the keyring-keyed PostHelper builder, so the v1.x create/update requests carry the connection scheme written by the new bridge.
Seed the connection_id-keyed draft from the post metadata when the post is Publicize-eligible, and write it back through the metadata container on save. When there is no draft, leave the existing publicize metadata untouched so a user's disabled connections are not silently re-enabled.
Resolve a SiteSocialConnectionsService for eligible blogs and return a v2SocialSharing binding so the shared SwiftUI section renders in the AbstractPost editor, replacing the keyring-keyed pre-publish UI. Strip the draft when no connections service is available; keep it for private posts.
Mark the superseded keyring-keyed publicize properties, methods, and UI as deprecated now that post editing keys per-connection state by connection_id in post metadata. Left in place to avoid a Core Data migration. Also retire the obsolete sharing-limit auto-disablement, which Jetpack Social no longer enforces.
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 32359 | |
| Version | PR #25587 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | f3f8cad | |
| Installation URL | 4csguaho37f4g |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 32359 | |
| Version | PR #25587 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | f3f8cad | |
| Installation URL | 39apa5il5k3b8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Note
I recommend reviewing by commits. The first commit is pure code format changes and can be ignored.
Description
The new JetpackSocial module was used in the Custom Posts module. This PR integrates it into the
AbstractPostediting process. That means we'll replace the existing implementation (using mix of keyring and connection based endpoints) with pure connection based endpoints.I think this should resolve most of the existing Jetpack Social issues. I'd need to dig into the backlog to be sure, though.
Testing instructions
Log in to your WordPress.com account, try the "Share to social media" setting on editing posts.