Skip to content

Conversation

@adalpari
Copy link
Contributor

@adalpari adalpari commented Sep 23, 2025

Description

This PR is adding the ability to include new categories when writing a post using the wordpress-rs library

Testing instructions

  1. Log into a self-hosted site without using Application Password
  2. Create or edit a post
  3. Select the categories item
  4. Add a new category
  • Verify the new category is added
  1. Enable and set Application Password
  2. Create or edit another post
  3. Add a new category
  • Verify the new category is added
Screen.Recording.2025-09-23.at.18.47.05.mov

@dangermattic
Copy link
Collaborator

dangermattic commented Sep 23, 2025

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 23, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr22227-34ed16c
Commit34ed16c
Direct Downloadwordpress-prototype-build-pr22227-34ed16c.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 23, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr22227-34ed16c
Commit34ed16c
Direct Downloadjetpack-prototype-build-pr22227-34ed16c.apk
Note: Google Login is not supported on these builds.

@codecov
Copy link

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 39.22%. Comparing base (801cd5d) to head (34ed16c).
⚠️ Report is 4 commits behind head on trunk.

Files with missing lines Patch % Lines
...g/wordpress/android/fluxc/store/TaxonomyStore.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #22227   +/-   ##
=======================================
  Coverage   39.22%   39.22%           
=======================================
  Files        2164     2164           
  Lines      103310   103310           
  Branches    15881    15881           
=======================================
  Hits        40522    40522           
  Misses      59193    59193           
  Partials     3595     3595           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adalpari adalpari changed the title CMM-779 edit and delete categories CMM-779 migrate add categories to wordpress-rs Sep 24, 2025
@adalpari adalpari requested a review from Copilot September 24, 2025 07:40
@adalpari adalpari marked this pull request as ready for review September 24, 2025 07:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the ability to add categories to posts using the wordpress-rs Rust library instead of the existing WordPress REST API implementation. The change enables creating new categories on self-hosted WordPress sites through the new Rust-based API client.

  • Adds createPostCategory method to handle category creation via the wordpress-rs library
  • Updates the routing logic to use the new Rust client for self-hosted sites when creating categories
  • Adds comprehensive test coverage for both success and error scenarios

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
TaxonomyStore.java Routes category creation for self-hosted sites to the new Rust-based client
TaxonomyRsApiRestClient.kt Implements the createPostCategory method using wordpress-rs API
TaxonomyRsApiRestClientTest.kt Adds unit tests for the new category creation functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sonarqubecloud
Copy link

Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

LGTM. Test plan succeeded for me.

@adalpari adalpari merged commit 566870d into trunk Sep 24, 2025
27 checks passed
@adalpari adalpari deleted the feature/CMM-779-edit-and-delete-categories branch September 24, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants