Skip to content

Conversation

@hafizrahman
Copy link
Contributor

@hafizrahman hafizrahman commented May 22, 2023

Part of #9080

Ref: pe5sF9-1xq-p2/#show-the-share-cta-in-product-form

Description

As part of improving the product sharing experience, we're exposing the "Share" menu item at any times, next to the ellipsis button, assuming the product is published and do not currently has any edits. In other words, whenever the "Publish" or "Save" menu item is not currently exposed next to the ellipsis button.

This also adds analytics to check which one is more performant: the exposed menu item, or the hidden-in-dropdown menu item. This is done by adding a source product_form or more_menu to the existing product_detail_share_button_tapped event. This is done to match the tracking added in iOS here.

Testing instructions

Display testing:

  1. Start app, go to Products, and pick an already published product. Make sure the "Share" menu item is shown on top right.
  2. Make changes to the product title. Ensure the button changes from "Share" to "Save".
  3. Manually delete the added changes to the product title. Ensure the button changes back to "Share".
  4. Go back, then create a new product using the Plus button.
  5. Make sure on top right the "Publish" button is shown, and the "Share" button is not shown.
  6. Do various other checks (e.g. by setting a product's status to draft) to ensure the Save/Publish buttons always has priority over the "Share" button.

Analytics testing:

  1. Start app, go to Products, and pick an already published product. Make sure the "Share" menu item is shown on top right.
  2. Tap "Share". Make sure something like this is shown: 🔵 Tracked: product_detail_share_button_tapped, Properties: {"source":"product_form"
  3. Edit site title randomly, then tap ellipsis button on top right,
  4. From the dropdown, tap "Share". Make sure something like this is shown: 🔵 Tracked: product_detail_share_button_tapped, Properties: {"source":"more_menu"

@hafizrahman hafizrahman added the feature: product details Related to adding or editing products, includes product settings. label May 22, 2023
@hafizrahman hafizrahman added this to the 13.8 milestone May 22, 2023
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 22, 2023

You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code:

@peril-woocommerce
Copy link

Messages
📖

This PR contains changes to Tracks-related logic. Please ensure the following are completed:
PR Author

  • The PR must be assigned the Tracks label
    PR Reviewer
  • The tracks events must be validated in the Tracks system.
  • Verify the internal tracks spreadsheet has also been updated.

Generated by 🚫 dangerJS

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 12.50% and project coverage change: -0.01 ⚠️

Comparison is base (f5cb917) 43.48% compared to head (c8fee8d) 43.47%.

❗ Current head c8fee8d differs from pull request most recent head 84ddbaf. Consider uploading reports for the commit 84ddbaf to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk    #9084      +/-   ##
============================================
- Coverage     43.48%   43.47%   -0.01%     
  Complexity     4036     4036              
============================================
  Files           836      836              
  Lines         43946    43953       +7     
  Branches       5742     5742              
============================================
+ Hits          19108    19109       +1     
- Misses        23163    23169       +6     
  Partials       1675     1675              
Impacted Files Coverage Δ
.../woocommerce/android/analytics/AnalyticsTracker.kt 20.76% <ø> (ø)
...erce/android/ui/products/ProductDetailViewModel.kt 40.73% <12.50%> (-0.15%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hafizrahman hafizrahman marked this pull request as ready for review May 23, 2023 08:05
@JorgeMucientes JorgeMucientes self-assigned this May 24, 2023
@JorgeMucientes
Copy link
Contributor

Code looks good and works as expected! Nicely done. 🚢

@JorgeMucientes JorgeMucientes merged commit 4114af6 into trunk May 24, 2023
@JorgeMucientes JorgeMucientes deleted the issue/9080-show-share-CTA-in-product-form branch May 24, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: product details Related to adding or editing products, includes product settings.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants