Skip to content

Commit 9235384

Browse files
authored
Remove legacy Jetpack Social publicize code (#25747)
* Remove the socialSharingV2 feature flag The Jetpack Social v2 experience is now always enabled. * Remove the unreachable legacy social sharing UI from post settings The v2 social sharing section fully shadows the legacy one: every condition that produced legacy content also produces the v2 binding, and PostSettings.sharing was already hardcoded to nil. * Apply swift-format to files touched by Task 2 * Remove the legacy Publicize sharing management UI The v2 connection management screen replaces SharingViewController everywhere. The stats insights nudge now opens the v2 screen, and the dashboard Jetpack Social card is removed along with its promo views. * Apply swift-format ahead of the legacy publicize services removal * Remove the legacy publicize services and remotes Deletes the keyring-based connection sync (SharingSyncService), the publicize half of SharingService/SharingServiceRemote, the share-limit sync (Jetpack Social no longer has per-post share limits), and the legacy publicize merge in PostHelper. The sharing-buttons half of both services is kept. Also removes the now-orphaned PublicizeInfo.configure(with:) helper in WordPressData, whose only caller was the deleted JetpackSocialService. * Apply swift-format ahead of the legacy publicize model removal * Remove the unused socialIcon(for:) style helper * Clean up leftover publicize references in comments and strings Fixes two stale copy-paste comments in the sharing buttons service and removes an unused Jetpack Social string from the pre-publishing sheet.
1 parent 053471d commit 9235384

79 files changed

Lines changed: 398 additions & 7392 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Modules/Sources/WordPressData/Blog+Extensions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ extension Blog {
2929
}
3030

3131
// Add remaining formats sorted by their display names
32-
let nonStandardFormats = postFormats
32+
let nonStandardFormats =
33+
postFormats
3334
.filter { $0.key != Blog.postFormatStandard }
3435
.sorted { $0.value.localizedCaseInsensitiveCompare($1.value) == .orderedAscending }
3536
.map { $0.key }

Modules/Sources/WordPressData/Swift/PublicizeInfo+CoreDataClass.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Foundation
22
import CoreData
3-
import WordPressKit
43

54
/// `PublicizeInfo` encapsulates the information related to Jetpack Social auto-sharing.
65
///
@@ -16,18 +15,11 @@ public class PublicizeInfo: NSManagedObject {
1615
}
1716

1817
@nonobjc public class func fetchRequest() -> NSFetchRequest<PublicizeInfo> {
19-
return NSFetchRequest<PublicizeInfo>(entityName: "PublicizeInfo")
18+
NSFetchRequest<PublicizeInfo>(entityName: "PublicizeInfo")
2019
}
2120

2221
@nonobjc public class func newObject(in context: NSManagedObjectContext) -> PublicizeInfo? {
23-
return NSEntityDescription.insertNewObject(forEntityName: Self.entityName(), into: context) as? PublicizeInfo
24-
}
25-
26-
public func configure(with remote: RemotePublicizeInfo) {
27-
self.shareLimit = Int64(remote.shareLimit)
28-
self.toBePublicizedCount = Int64(remote.toBePublicizedCount)
29-
self.sharedPostsCount = Int64(remote.sharedPostsCount)
30-
self.sharesRemaining = Int64(remote.sharesRemaining)
22+
NSEntityDescription.insertNewObject(forEntityName: Self.entityName(), into: context) as? PublicizeInfo
3123
}
3224

3325
/// A value-type representation for Publicize auto-sharing usage.

Modules/Sources/WordPressKit/JetpackSocialServiceRemote.swift

Lines changed: 0 additions & 35 deletions
This file was deleted.

Modules/Sources/WordPressKit/KeyringConnection.swift

Lines changed: 0 additions & 23 deletions
This file was deleted.

Modules/Sources/WordPressKit/KeyringConnectionExternalUser.swift

Lines changed: 0 additions & 11 deletions
This file was deleted.

Modules/Sources/WordPressKit/RemotePublicizeConnection.swift

Lines changed: 0 additions & 22 deletions
This file was deleted.

Modules/Sources/WordPressKit/RemotePublicizeInfo.swift

Lines changed: 0 additions & 15 deletions
This file was deleted.

Modules/Sources/WordPressKit/RemotePublicizeService.swift

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)