-
Notifications
You must be signed in to change notification settings - Fork 134
[POS][Local Catalog] Connect product list to POS database #14636
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
base: woomob-1069-woo-poslocal-catalog-update-ptr-behavior-fetch-products-and
Are you sure you want to change the base?
Conversation
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
…tch-products-and' into woomob-1072-woo-poslocal-catalog-connect-product-list-to-pos-products
There was a problem hiding this 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 integrates local database storage for the POS product catalog, controlled by the WOO_POS_LOCAL_CATALOG_M1 feature flag. When enabled, products are loaded from the local database instead of the existing cache/remote hybrid approach.
- Adds sorting by product name (case-insensitive) at the database level
- Introduces a new database-backed data source for products with search filtering capabilities
- Updates product retrieval logic in cart and totals repositories to support both local catalog and legacy flows
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
WooPosProductsDao.kt | Adds case-insensitive sorting by name to database query |
WooPosProductsInDbDataSource.kt | New data source implementation for database-backed product loading |
WooPosProductsDataSourceInterface.kt | Interface to unify different product data source implementations |
WooPosProductsViewModel.kt | Updates to use feature flag-based data source selection |
WooPosTotalsRepository.kt | Adds conditional product retrieval from local catalog |
WooPosCartViewModel.kt | Adds conditional product retrieval from local catalog |
Test files | Updates and new tests to support the changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...kotlin/com/woocommerce/android/ui/woopos/home/items/products/WooPosProductsInDbDataSource.kt
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## woomob-1069-woo-poslocal-catalog-update-ptr-behavior-fetch-products-and #14636 +/- ##
=============================================================================================================
- Coverage 38.48% 38.48% -0.01%
- Complexity 9773 9781 +8
=============================================================================================================
Files 2066 2067 +1
Lines 115583 115657 +74
Branches 15402 15426 +24
=============================================================================================================
+ Hits 44480 44506 +26
- Misses 66969 67008 +39
- Partials 4134 4143 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WOOMOB-1072
Description
The goal of this PR is to load products from the DB instead of the existing in-memory cache / remote call hybrid store. Currently, the logic that decides on which data source to use is based on the feature flag WOO_POS_LOCAL_CATALOG_M1 state.
Steps to reproduce
—
Testing information
The tests that have been performed
Above
Images/gif
N/A
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.