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

[Woo POS] Bump minimum required WC version to 9.6, replace local products filters with downloadable parameter, page size 25 #14843

Open
wants to merge 10 commits into
base: trunk
Choose a base branch
from

Conversation

jaclync
Copy link
Contributor

@jaclync jaclync commented Jan 10, 2025

Closes: #1483

Description

This pull request updates products and variations and filtering criteria based on the latest decision pdfdoF-62l-p2#comment-7224. It removes the virtual local filter (as we want to show virtual products), replaces the downloadable local filter with a parameter in the API request that works for WC versions 9.6+, and updates the page size from 100 to 25 for products and variations requests.

Regarding the page size, I tested with the smallest font size on the tallest iOS device available - iPad Pro 13 in' so far in iOS 18.2. The minimum amount of items to fill the scroll view in portrait is 10. Even so, I picked 25 to match Android. Please feel free to share any thoughts on the page size.

🗒️ It's likely we will update the minimum WC version requirement to 9.6 for POS based on p1736485809856869/1736484154.214279-slack-C070SJRA8DP. Since 9.6 is still in beta 2 at the time of writing, we will postpone the version requirement bump until the version is publicly released.

Pagination and Product Parameters:

Test Updates:

Filtering Criteria:

Steps to reproduce

  • Switch to a store eligible for POS, has at least one variable and downloadable product, and has WC version >= 9.6
  • Go to Menu > Point of Sale mode --> the downloadable product should not be included, and all simple products in the list should have a price
  • Tap on a variable product --> variations should be loaded shortly, up to 25 per page

Testing information

  • @jaclync tests that the products are loaded without the downloadable filter for stores on WC version < 9.6

Screenshots

Notice that the downloadable products are filtered out.

before (with local filters removed) after
Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-01-10 at 12 50 46 Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-01-10 at 13 50 15

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

@jaclync jaclync added type: task An internally driven task. feature: POS labels Jan 10, 2025
@jaclync jaclync added this to the 21.5 milestone Jan 10, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 10, 2025

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14843-f039cb2
Version21.4
Bundle IDcom.automattic.alpha.woocommerce
Commitf039cb2
App Center BuildWooCommerce - Prototype Builds #12564
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

… to include virtual product in the API response.
@jaclync jaclync marked this pull request as ready for review January 10, 2025 07:08
@jaclync jaclync requested review from staskus, iamgabrielma and joshheald and removed request for iamgabrielma January 10, 2025 07:08
@joshheald joshheald mentioned this pull request Jan 10, 2025
4 tasks
Copy link
Collaborator

@staskus staskus left a comment

Choose a reason for hiding this comment

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

This works as described. However, I think based on pdfdoF-62l-p2#comment-7285 it could be also expanded or done in another PR:

  • Allow no-price products
  • Restrict POS entry from 9.6+

func isNotDownloadable(product: Product) -> Bool {
!product.downloadable
}

func hasPrice(product: Product) -> Bool {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Based on pdfdoF-62l-p2#comment-7285, this one can be removed as well 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in b192a0c.

@jaclync
Copy link
Contributor Author

jaclync commented Jan 13, 2025

Potential latest decision: p1736504688523299/1736484154.214279-slack-C070SJRA8DP

  • Empty-price and free products should be shown in POS
  • Virtual products should be shown in POS
  • Let's limit it to version 9.6+, but we need to ensure that it won't get released unless WooCommerce 9.6 is publicly available

Based on the proposed decision above, I will wait for WC 9.6 to be released this week before making all the changes:

  • Remove empty price filter
  • Update minimum WC version to 9.6

@jaclync jaclync added the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Jan 13, 2025
@dangermattic
Copy link
Collaborator

1 Error
🚫 This PR is tagged with status: do not merge label(s).

Generated by 🚫 Danger

@jaclync jaclync changed the title [Woo POS] Replace product/variation local filtering with WC 9.6+ API support with page size 25 [Woo POS] Bump minimum required WC version to 9.6, replace local products filters with downloadable parameter and page size 25 Jan 15, 2025
@jaclync jaclync changed the title [Woo POS] Bump minimum required WC version to 9.6, replace local products filters with downloadable parameter and page size 25 [Woo POS] Bump minimum required WC version to 9.6, replace local products filters with downloadable parameter, page size 25 Jan 15, 2025
@jaclync
Copy link
Contributor Author

jaclync commented Jan 15, 2025

WC 9.6 is still not publicly available as of today. As I'm AFK after this Friday, I'm trying to get the PR ready for merge first and it can be merged when 9.6 is in GA.

@staskus it's not urgent, this PR is ready for review again with the changes in #14843 (comment).

@jaclync jaclync requested a review from staskus January 15, 2025 07:45
@jaclync
Copy link
Contributor Author

jaclync commented Jan 16, 2025

Unit tests are failing, please skip the review for now and I'll update when it's ready for review again.

@staskus
Copy link
Collaborator

staskus commented Jan 16, 2025

Unit tests are failing, please skip the review for now and I'll update when it's ready for review again.

TTP education tests should hopefully succeed if you merge now with trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: POS status: do not merge Dependent on another PR, ready for review but not ready for merge. type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants