Skip to content

Use the new Jetpack Social connection on AbstractPost#25587

Open
crazytonyli wants to merge 7 commits into
trunkfrom
task/abstract-post-migrate-to-jetpack-social
Open

Use the new Jetpack Social connection on AbstractPost#25587
crazytonyli wants to merge 7 commits into
trunkfrom
task/abstract-post-migrate-to-jetpack-social

Conversation

@crazytonyli
Copy link
Copy Markdown
Contributor

@crazytonyli crazytonyli commented May 27, 2026

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 AbstractPost editing 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.

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.
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented May 27, 2026

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@crazytonyli crazytonyli changed the title Use the new Jetpack Social connection on WordPress.com sites Use the new Jetpack Social connection on AbstractPost May 27, 2026
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented May 27, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number32359
VersionPR #25587
Bundle IDorg.wordpress.alpha
Commitf3f8cad
Installation URL4csguaho37f4g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented May 27, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number32359
VersionPR #25587
Bundle IDcom.jetpack.alpha
Commitf3f8cad
Installation URL39apa5il5k3b8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@crazytonyli crazytonyli requested a review from jkmassel May 27, 2026 23:01
@crazytonyli crazytonyli modified the milestones: 26.9 ❄️, 27.0 May 27, 2026
@crazytonyli crazytonyli marked this pull request as ready for review May 27, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants