Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to the WPCom themes fetching endpoint #2907

Merged
merged 6 commits into from
Nov 27, 2023

Conversation

hichamboushaba
Copy link
Member

@hichamboushaba hichamboushaba commented Nov 24, 2023

⚠️ this has a breaking change for WPAndroid, please don't merge, I'll synchronize merging when this and the accompanying WPAndroid PR wordpress-mobile/WordPress-Android#19668 is approved.


This PR adds some improvements that WCAndroid needs to implement theme selection support for WooExpress sites (woocommerce/woocommerce-android#10224):

  1. Allows passing a filter query to the fetching endpoint.
  2. Allows customizing the results limit of the fetching endpoint.
  3. Adds a function that allows querying themes from the DB using a list of IDs (will be useful for us given the hardcoded list of themes we will support)
  4. Fix theme installation on atomic sites: it seems theme installation was broken in the Jetpack app for quite a while, because we try to add a suffix -wpcom to the theme's ID, while we should do it only for self-hosted Jetpack sites, Calypso does a similar thing here, the commit 89d2c38 fixes this.

Testing

  1. Open the example app, and sign in.
  2. Click on Themes.
  3. Click on Fetch WP.Com themes.
  4. Test different scenarios, and confirm they work as expected.
  5. Pick an atomic site.
  6. Type the ID of a theme.
  7. Click on Install WP.COM theme on Jetpack Site
  8. Confirm it works.

Copy link
Contributor

@0nko 0nko left a comment

Choose a reason for hiding this comment

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

LGMT 👍

@hichamboushaba hichamboushaba merged commit 8076d17 into trunk Nov 27, 2023
13 checks passed
@hichamboushaba hichamboushaba deleted the wpcom-them-fetch-improvements branch November 27, 2023 15:34
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.

2 participants