Remove dead Jetpack Social share-limit code

オープン
#26,314 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
54/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
swift
領域
database, mobile

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

[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

主要言語
Swift
スター
3.9k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
136

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

wordpress-mobile/WordPress-iOS のほかの issue

wordpress-mobile/WordPress-iOS の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。