Skip to content

Conversation

kean
Copy link
Contributor

@kean kean commented Oct 8, 2025

Changes

  • Remove unused AbstactPost properties: metaIsLocal, metaPublishImmediatelly, statusAfterSync, confirmedChangesHash
  • Remove unused Blog properties: rawBlockEditorSettings
  • Remove unused BlobEntity
  • Add metadata field to AbstractPost
  • Add commentsStatus and pingsStatus to Post
  • Add formattedSize to Media

Testing instructions

I tested the changes with a debugger. The information we need does now get stored in the DB.

Post Metadata

 (lldb) po [NSJSONSerialization JSONObjectWithData:post.rawMetadata options:nil error:nil] 
<__NSArrayI 0x117e27860>(
{
    id = 2372;
    key = "advanced_seo_description";
    value = "";
},
{
    id = 2380;
    key = footnotes;
    value = "";
},
{
    id = 2373;
    key = "jetpack_seo_html_title";
    value = "";
},
{
    id = 2374;
    key = "jetpack_seo_noindex";
    value = "";
},
{
    id = 2347;
    key = "wp_jp_foreign_id";
    value = "95199E7F-EEF2-46B0-BC89-898AE817CEAD";
},
{
    id = 2377;
    key = "_jetpack_dont_email_post_to_subs";
    value = "";
},
{
    id = 2376;
    key = "_jetpack_newsletter_access";
    value = subscribers;
},
{
    id = 2386;
    key = "_jetpack_newsletter_tier_id";
    value = 0;
},
{
    id = 2383;
    key = "_wpas_done_all";
    value = "";
},
{
    id = 2382;
    key = "_wpas_feature_enabled";
    value = 1;
},
{
    id = 2381;
    key = "_wpas_mess";
    value = "";
},
{
    id = 2384;
    key = "_wpas_options";
    value =     {
        "image_generator_settings" =         {
            "default_image_id" = 0;
            enabled = 0;
            font = "";
            template = highway;
        };
        version = 2;
    };
}
)

Discussion Settings

(lldb) po [postPost commentsStatus];
open
(lldb) po [postPost pingsStatus];
open

Media Size

(lldb) po remoteMedia.formattedSize
 1,013.56 KB
  - some : "1,013.56 KB"

@dangermattic
Copy link
Collaborator

dangermattic commented Oct 8, 2025

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

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 8, 2025

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 Number29426
VersionPR #24927
Bundle IDcom.jetpack.alpha
Commit2009bfe
Installation URL1kre20s37i54o
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 8, 2025

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 Number29426
VersionPR #24927
Bundle IDorg.wordpress.alpha
Commit2009bfe
Installation URL63e384dts1umo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@kean kean added the General label Oct 8, 2025
@kean kean added this to the 26.5 milestone Oct 8, 2025
@kean kean force-pushed the task/jetpack-access branch from 886ca4d to 66c4f25 Compare October 8, 2025 17:49
@kean kean changed the title Add metadata to AbstractPost Add Core Data model 156 Oct 8, 2025
@kean kean requested a review from crazytonyli October 8, 2025 18:02
@kean kean marked this pull request as ready for review October 8, 2025 18:02
@kean kean force-pushed the task/jetpack-access branch from 66c4f25 to 2009bfe Compare October 8, 2025 20:50
[self updateCommentsForPost:post];
}

post.rawMetadata = [PostHelper makeRawMetadataFrom:remotePost];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will now simply store everything, so it'll be easy to add more features that rely on metadata in the future if needed. I also plan to add couple of convenience APIs to make it easier to parse it and find the options you need.

@kean kean requested a review from jkmassel October 8, 2025 20:51
Copy link

sonarqubecloud bot commented Oct 8, 2025

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.

4 participants