Skip to content

Comments

[WOOMOB-2067] Wire FTS search to product search UI#15290

Draft
kidinov wants to merge 9 commits intowoomob-2066-woo-posfts-implement-search-query-with-relevance-rankingfrom
woomob-2067-woo-posfts-wire-search-to-product-search-ui
Draft

[WOOMOB-2067] Wire FTS search to product search UI#15290
kidinov wants to merge 9 commits intowoomob-2066-woo-posfts-implement-search-query-with-relevance-rankingfrom
woomob-2067-woo-posfts-wire-search-to-product-search-ui

Conversation

@kidinov
Copy link
Contributor

@kidinov kidinov commented Feb 4, 2026

Closes WOOMOB-2067

Description

Wires the FTS (Full Text Search) results — including product variations — to the existing POS product search UI. When the POS_PRODUCTS_FTS feature flag is enabled:

  • Search results now include variations alongside simple and variable products
  • Variation search results display parent product name as the title, variation attributes as subtitle, and price below
  • Clicking a variation in search results adds it directly to the cart
  • Search placeholder updates to "Search products and variations"

Key implementation details:

  • Converted WooPosProductType from enum to sealed class so Variation can carry parentProductName with compile-time safety
  • Introduced VariationSearchResult view state type to cleanly separate search result variations (with parent name) from variation list variations (without)
  • Parent product name flows from FTS entity through the mapper to the UI layer

Test Steps

  1. Enable POS_PRODUCTS_FTS feature flag
  2. Open POS and tap the search bar
  3. Verify placeholder reads "Search products and variations"
  4. Search for a term that matches a variation (e.g. a color or size attribute)
  5. Verify variation results show: parent product name (title), attributes (subtitle), price
  6. Tap a variation result → verify it's added to cart
  7. Disable feature flag → verify search placeholder reverts to "Search products" and no variations appear

Images/gif

To be added

  • 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.

@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

📲 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 NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commitf79f044
Direct Downloadwoocommerce-wear-prototype-build-pr15290-f79f044.apk

@wpmobilebot
Copy link
Collaborator

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

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitf79f044
Direct Downloadwoocommerce-prototype-build-pr15290-f79f044.apk

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 52.63158% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.84%. Comparing base (7badb81) to head (f79f044).

Files with missing lines Patch % Lines
...ce/android/ui/woopos/home/items/WooPosItemsList.kt 0.00% 38 Missing ⚠️
...os/home/items/search/WooPosItemsSearchViewModel.kt 69.04% 11 Missing and 2 partials ⚠️
...pos/home/items/products/WooPosProductsViewModel.kt 25.00% 2 Missing and 1 partial ⚠️
...items/search/WooPosProductsSearchInDbDataSource.kt 0.00% 3 Missing ⚠️
...id/ui/woopos/home/items/WooPosItemsSearchHelper.kt 60.00% 1 Missing and 1 partial ⚠️
...home/items/variations/WooPosVariationsViewModel.kt 0.00% 0 Missing and 2 partials ⚠️
...pos/common/data/models/WooPosProductModelMapper.kt 90.90% 1 Missing ⚠️
.../store/pos/localcatalog/WooPosLocalCatalogStore.kt 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                            Coverage Diff                                             @@
##             woomob-2066-woo-posfts-implement-search-query-with-relevance-ranking   #15290      +/-   ##
==========================================================================================================
- Coverage                                                                   38.85%   38.84%   -0.01%     
- Complexity                                                                  10676    10677       +1     
==========================================================================================================
  Files                                                                        2208     2208              
  Lines                                                                      125600   125684      +84     
  Branches                                                                    17424    17439      +15     
==========================================================================================================
+ Hits                                                                        48797    48827      +30     
- Misses                                                                      71846    71898      +52     
- Partials                                                                     4957     4959       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants