woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

[Product Filter] Remove redundant filter button #12814

Closed ThomazFB closed 4 weeks ago

ThomazFB commented 4 weeks ago

Summary

Fix issue #12623 by making sure that the Product selection screen never displays the filter button when the selector is already being opened from a Filtering flow.

The Product selection screen is used in multiple areas of the app, like Order Editing and Creation, and due to it's nature, it also features a filter button to enhance the search. But the main Product Filter inside the Product list screen can also call the Product Selector screen, causing a weird scenario where we display a filter button inside an already filtering flow.

To mitigate this issue, the Product selection screen is aware if it was called from a filtering flow or not, and hide the filter button when it's not needed.

Screen Capture

https://github.com/user-attachments/assets/7189dbc4-1e99-4a5d-93a5-e2155ddef555

How to Test

Scenario 1

  1. Open the app and go to the Orders list
  2. Select the Filters option and go to the Products sub-option
  3. Once in the Product Selector screen, make sure the filter button is not visible anywhere there

Scenario 2

  1. Open the app and go to the Order Creation
  2. Select the Add Product option
  3. Once in the Product Selector screen, make sure the filter button is visible and works as expected

Update release notes:

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:

dangermattic commented 4 weeks ago
1 Warning
:warning: This PR is assigned to the milestone 21.0. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by :no_entry_sign: Danger

wpmobilebot commented 4 weeks ago
📲 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
Commitad4166efb5005dec4514554dd2b223bd156b6c16
Direct Downloadwoocommerce-wear-prototype-build-pr12814-ad4166e.apk
wpmobilebot commented 4 weeks ago

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

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commitad4166efb5005dec4514554dd2b223bd156b6c16
Direct Downloadwoocommerce-prototype-build-pr12814-ad4166e.apk
codecov-commenter commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 40.86%. Comparing base (e1ef2aa) to head (ad4166e). Report is 14 commits behind head on trunk.

Files with missing lines Patch % Lines
...d/ui/products/selector/ProductSelectorViewModel.kt 75.00% 1 Missing and 3 partials :warning:
.../variations/selector/VariationSelectorViewModel.kt 25.00% 0 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #12814 +/- ## ========================================= Coverage 40.86% 40.86% - Complexity 5765 5767 +2 ========================================= Files 1237 1237 Lines 69857 69861 +4 Branches 9707 9708 +1 ========================================= + Hits 28545 28549 +4 Misses 38677 38677 Partials 2635 2635 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.