Skip to content

Conversation

@malinajirka
Copy link
Contributor

@malinajirka malinajirka commented Sep 4, 2025

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

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@malinajirka malinajirka changed the base branch from issue/woomob-1263-woo-poslocal-catalog-start-using-pos-specific-model-across to feature-branch-for-pos-product-migration September 4, 2025 09:23
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 4, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit66e8e3f
Direct Downloadwoocommerce-wear-prototype-build-pr14567-66e8e3f.apk

@malinajirka malinajirka added this to the 23.3 milestone Sep 4, 2025
@malinajirka malinajirka marked this pull request as ready for review September 4, 2025 09:27
@malinajirka malinajirka changed the title Issue/issue/woomob 1263 woo poslocal catalog start using pos specific model across continue migrating POS Product Migration Step 2 Sep 4, 2025
@malinajirka malinajirka changed the title POS Product Migration Step 2 POS Product Migration Step 3 Sep 4, 2025
@malinajirka malinajirka requested a review from Copilot September 4, 2025 10:22
…sue/woomob-1263-woo-poslocal-catalog-start-using-pos-specific-model-across-continue-migrating
@malinajirka malinajirka changed the title POS Product Migration Step 3 POS Product Migration Step 4 Sep 4, 2025
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 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 Product model with WooPosProductModelVersion2 across POS components
  • Updates product mapping to use WCProductToWooPosProductModelMapper instead 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.

Comment on lines +202 to +203
productMapper = productMapper,

Copy link

Copilot AI Sep 4, 2025

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.

Suggested change
productMapper = productMapper,

Copilot uses AI. Check for mistakes.
…common/data/WooPosProductsInMemoryCacheTest.kt

Co-authored-by: Copilot <[email protected]>
@samiuelson samiuelson self-assigned this Sep 4, 2025
@malinajirka malinajirka merged commit 524e313 into feature-branch-for-pos-product-migration Sep 5, 2025
10 of 17 checks passed
@malinajirka malinajirka deleted the issue/issue/woomob-1263-woo-poslocal-catalog-start-using-pos-specific-model-across-continue-migrating branch September 5, 2025 05:14
@malinajirka malinajirka mentioned this pull request Sep 10, 2025
1 task
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.

4 participants