Remove dead Jetpack Social share-limit code

Abierto
#26,314 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
swift
Área
database, mobile

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

[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

Lenguaje dominante
Swift
Estrellas
3.9k
Forks
1.2k
Merge medio
1 d 23 h
PR fusionados (30 d)
136

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wordpress-mobile/WordPress-iOS

Todos los issues de wordpress-mobile/WordPress-iOS

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.