Remove dead Jetpack Social share-limit code

Đang mở
#26,314 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
54/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
swift
Lĩnh vực
database, mobile

Hướng nghiên cứu

Start with JetpackSocialError.swift, PublicizeInfo+CoreDataClass.swift, PublicizeInfo+CoreDataProperties.swift, and Blog.swift to understand the Swift-only removals and Core Data references. Then inspect the WordPress.xcdatamodeld versions and the project's migration tests before creating a new model version. Done means the unused code, entity, and relationship are removed and an upgrade from a build with saved PublicizeInfo rows succeeds.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

[Type] Tech Debt Core Data Jetpack

#25747 removed the legacy Jetpack Social / Publicize code, including the share-limit sync. Jetpack Social no longer has per-post share limits (see #23217). The code below is now unused on trunk (e64c851c0d): nothing outside its own files references it, tests included.

Swift only

  • WordPress/Classes/Jetpack/Utility/JetpackSocialError.swift. Delete the file. All three cases (missingSharingLimit, noConnectionViewInvalidState, noSharesViewInvalidState) belonged to views that #25747 deleted.
  • PublicizeInfo.sharingLimit and the nested SharingLimit struct, in Modules/Sources/WordPressData/Swift/PublicizeInfo+CoreDataClass.swift

Core Data (needs a new model version)

The whole PublicizeInfo entity is unused. Nothing creates, fetches or reads one. The only reference is the Blog.publicizeInfo relationship that declares it.

  • Remove the PublicizeInfo entity (shareLimit, sharesRemaining, toBePublicizedCount, sharedPostsCount) and the Blog.publicizeInfo relationship in a new WordPress.xcdatamodeld version. The current version is WordPress 158. Removing an entity and a relationship should be a lightweight migration, but test it by upgrading from a build that has PublicizeInfo rows saved.
  • Delete PublicizeInfo+CoreDataClass.swift and PublicizeInfo+CoreDataProperties.swift, and remove @NSManaged public var publicizeInfo from Blog.swift.

The Swift-only items can land on their own, ahead of the model change.

The unused Jetpack Social WPAnalyticsEvent cases are tracked separately in #21221.


Generated by Claude Code

Ngôn ngữ chính
Swift
Star
3.9k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
136

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wordpress-mobile/WordPress-iOS

Tất cả issue của wordpress-mobile/WordPress-iOS

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.