-
Notifications
You must be signed in to change notification settings - Fork 136
POS Product Migration Step 4 #14567
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
POS Product Migration Step 4 #14567
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.
|
…sue/woomob-1263-woo-poslocal-catalog-start-using-pos-specific-model-across-continue-migrating
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 migrates POS-specific components from using the generic Product model to the new WooPosProductModelVersion2 model as part of a larger migration effort. The changes systematically update product caching, data sources, indexing, and provider components to use POS-specific data structures.
- Replaces
Productmodel withWooPosProductModelVersion2across POS components - Updates product mapping to use
WCProductToWooPosProductModelMapperinstead of direct model conversion - Introduces new product generation utilities for testing with POS-specific model structures
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| WooPosProductsDataSourceTest.kt | Updates test to use new POS product model and custom product generation |
| WooPosProductsInMemoryCacheTest.kt | Migrates cache tests to use WooPosProductModelVersion2 |
| WooPosPopularProductsProviderTest.kt | Adds product mapper dependency to provider tests |
| WooPosProductsIndex.kt | Updates return types to use POS-specific product model |
| WooPosProductsDataSource.kt | Replaces Product model usage with WooPosProductModelVersion2 and adds mapper |
| WooPosProductsInMemoryCache.kt | Updates cache interface to work with POS product model |
| WooPosProductsCache.kt | Changes interface signatures to use WooPosProductModelVersion2 |
| WooPosPopularProductsProvider.kt | Migrates to POS product model and adds mapper dependency |
| WooPosGetProductById.kt | Updates to return POS-specific product model |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...src/test/kotlin/com/woocommerce/android/ui/woopos/home/items/WooPosProductsDataSourceTest.kt
Show resolved
Hide resolved
...test/kotlin/com/woocommerce/android/ui/woopos/common/data/WooPosProductsInMemoryCacheTest.kt
Outdated
Show resolved
Hide resolved
| productMapper = productMapper, | ||
|
|
Copilot
AI
Sep 4, 2025
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.
There's an unnecessary blank line before the closing parenthesis. Remove the extra line for consistent formatting.
| productMapper = productMapper, |
…common/data/WooPosProductsInMemoryCacheTest.kt Co-authored-by: Copilot <[email protected]>
524e313
into
feature-branch-for-pos-product-migration
Failing CI is expected here since this is a partial migration.
Description
This is part of the migration to POS specific Product Model. There will be many changes and I want to avoid huge PRs. Therefore I created a feature branch - I'll create a PR for each set of changes. The CI won't be able to build this PR, but I personally wouldn't worry about it -> we can ensure everything is green when we are merging the feature branch back to trunk.
This PR migrates product cache/product provider/product data source/product index.
Let me know if you agree with this approach. Ideas are welcome.
The changes are pretty straight-forward in this case - we just change the reference and update the mapping.
Images/gif
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.