Skip to content
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

[HACK week] Enables favorite products filter feature #14597

Open
wants to merge 10 commits into
base: trunk
Choose a base branch
from

Conversation

selanthiraiyan
Copy link
Contributor

@selanthiraiyan selanthiraiyan commented Dec 4, 2024

Part of: #12274

Description

Enables the HACK week feature - option to filter favorite products in product lists screen and product selector screen.

⚠️ Don't merge until we get a go-ahead here. pe5sF9-3ag-p2#comment-4157

Changes

  • Enables feature flag.
  • Adds missing tracking.
  • Removed unnecessary MainActor usage to remove warnings.

Steps to reproduce

Prerequisites

  • Use a Woo store with more than 100 products.
  • You can create a JN store and generate 100+ products using Woo Smooth generator.
  • Using the smooth generator helps to generate products with different types, status and category. (Helps with testing filters)
  • Follow instructions from this PR and mark a few products as favorites.

Products list

  • Login into the app if needed
  • Navigate to Products tab
  • Tap "Filter"
  • Validate that you see the "Favorite Products" filter.
  • Select the "Favorite Products" filter -> Switch to "Favorite Products" from "Any"
  • Tap "Show Products"
  • Xcode logs should track the following event with the new favorite_products value in filters propoerty.
🔵 Tracked product_filter_list_show_products_button_tapped, properties: [is_wpcom_store: false, blog_id: 210109692, site_url: https://yoursite..com, store_id: 121212-7fa0cb61a383, was_ecommerce_trial: false, plan: jetpack_security_daily, filters: favorite_products, source: products_tab]
  • Validate that favorite products are loaded correctly.
  • Apply other filters and ensure that they work as before.

Product selector

  • Login into the app if needed
  • Navigate to Orders tab
  • Tap "+" -> "Add products"
  • Tap "Filter"
  • Validate that you see the "Favorite Products" filter.
  • Select the "Favorite Products" filter -> Switch to "Favorite Products" from "Any"
  • Tap "Show Products"
  • Xcode logs should track the following event with the new favorite_products value in filters propoerty.
🔵 Tracked product_filter_list_show_products_button_tapped, properties: [source: order_form, plan: jetpack_security_daily, filters: favorite_products, blog_id: 210109692, site_url: https://yoursite.com, is_wpcom_store: false, store_id: 12121212-7fa0cb61a383, was_ecommerce_trial: false]
  • Validate that favorite products are loaded correctly.
  • Apply other filters and ensure that they work as before.

Testing information

  • Tested the product filtering works when applying the favorite product filter.
  • Tested that product filtering works correctly when applying multiple filters along with the favorite product filter.
  • Tested that product filtering works correctly in both product selector and product list screens.
  • Tested that adding filters tracks the correct tracks event with correct properties.

Screenshots

Gif

iPhone

Product list Product selector
Simulator Screen Recording - iPhone 15 Pro Max - 2024-09-20 at 13 38 31 Simulator Screen Recording - iPhone 15 Pro Max - 2024-09-20 at 13 38 47

iPad

Product list Product selector
Simulator Screen Recording - iPad Pro 13-inch (M4) - 2024-09-20 at 13 42 02 Simulator Screen Recording - iPad Pro 13-inch (M4) - 2024-09-20 at 13 43 33

Video recording

Product list Product selector
https://github.com/user-attachments/assets/65e16089-5594-4497-974b-aa52a766ee20 https://github.com/user-attachments/assets/07fb837d-37a1-41ca-8fc2-c357f0588971

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

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:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

@selanthiraiyan selanthiraiyan added the feature: product list Related to the product list. label Dec 4, 2024
@selanthiraiyan selanthiraiyan added this to the 21.3 milestone Dec 4, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Dec 4, 2024

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

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14597-6a190ad
Version21.2
Bundle IDcom.automattic.alpha.woocommerce
Commit6a190ad
App Center BuildWooCommerce - Prototype Builds #12024
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@selanthiraiyan selanthiraiyan marked this pull request as ready for review December 4, 2024 09:10
@itsmeichigo itsmeichigo self-assigned this Dec 5, 2024
Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sharma, I thought we wanted to keep the feature flags and only remove them after a few releases? That would make it easier to backtrack in case something breaks.

One more thing: I think the filter in the product selector affects the list in Product tab as well:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-05.at.17.32.33.mp4

This seems to be the issue for all fitlers not just the favorite one, so we should probably log a separate issue to fix.

@selanthiraiyan
Copy link
Contributor Author

One more thing: I think the filter in the product selector affects the list in Product tab as well:

This seems to be the issue for all fitlers not just the favorite one, so we should probably log a separate issue to fix.

Good catch, Huong! I logged an issue #14624

@selanthiraiyan
Copy link
Contributor Author

Thanks for the review, Huong! 🙇

I thought we wanted to keep the feature flags and only remove them after a few releases? That would make it easier to backtrack in case something breaks.

I agree, Huong. I thought removing the feature flag would be cleaner due to the minimal usage of the feature flag in code.

The PR is ready for another round of review.

Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates!

@selanthiraiyan selanthiraiyan removed this from the 21.3 milestone Dec 19, 2024
@dangermattic
Copy link
Collaborator

1 Error
🚫 PR is not assigned to a milestone.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: product list Related to the product list.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants