Skip to content

Conversation

@hafizrahman
Copy link
Contributor

@hafizrahman hafizrahman commented Nov 26, 2024

Closes: #12503

Description

Currently, there is an issue where if the site has no product, the Blaze intro screen has no way to proceed with creating the campaign. This PR fixes that by adding a product creation step from the intro.

Steps to reproduce

  1. Have a test site with no products, ideally a completely new site so Blaze campaign intro is still shown,
  2. Go to More Menu, tap Blaze, ensure the "Get your products seen by millions" intro screen is shown,
  3. Tap "Start your campaign" CTA button,
  4. Ensure a "No products found" dialog is shown
  5. Test that "Cancel" button is working (returns to the intro screen)
  6. Tap "Start your campaign" CTA button again,
  7. Test that the "Create product" dialog is shown (opens the product creation bottom sheet). This sheet is the same as displayed by the Onboarding card > "Add your first product" option, if you want to compare.
  8. Go through the product creation process and ensure it goes well,
  9. After product is created, close the product creation screen and ensure it goes back to the Blaze campaign intro screen,
  10. Tap "Start your campaign" CTA button again, ensure it now opens the campaign creation correctly.

Optional: trash the Product and start over from step 3 to 5, ensure it shows the dialog again.

Testing information

I tested this on an emulated Pixel 8 with API 32, following closely the steps above. I can't think of any edge cases yet, but let me know if there's other entry points aside from more menu that needs to be covered too.

The tests that have been performed

I tested following the steps outlined above.

Images/gif

Dialog shown when no product exists Bottom sheet shown when "Create Product" is tapped
Screenshot_20241126_135844 Screenshot_20241126_135857
  • 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.

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 big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@hafizrahman hafizrahman added this to the 21.3 milestone Nov 26, 2024
@hafizrahman hafizrahman added type: task An internally driven task. feature: blaze Related to the Blaze project labels Nov 26, 2024
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 26, 2024

📲 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
Commit2062dac
Direct Downloadwoocommerce-wear-prototype-build-pr13001-2062dac.apk

@hafizrahman hafizrahman marked this pull request as ready for review November 26, 2024 07:17
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 26, 2024

📲 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
Commit2062dac
Direct Downloadwoocommerce-prototype-build-pr13001-2062dac.apk

@codecov-commenter
Copy link

codecov-commenter commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.73%. Comparing base (95ad84b) to head (2062dac).
Report is 222 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #13001   +/-   ##
=========================================
  Coverage     39.72%   39.73%           
- Complexity     6036     6037    +1     
=========================================
  Files          1274     1274           
  Lines         73453    73458    +5     
  Branches      10074    10074           
=========================================
+ Hits          29177    29185    +8     
+ Misses        41701    41699    -2     
+ Partials       2575     2574    -1     

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

@JorgeMucientes JorgeMucientes self-assigned this Nov 27, 2024
Copy link
Contributor

@JorgeMucientes JorgeMucientes left a comment

Choose a reason for hiding this comment

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

Code looks good and works as expected. Nice job @hafizrahman. Just left a minor np, feel free to ignore it.

navigateToProductSelectorScreen()
}

is BlazeCampaignCreationIntroViewModel.ShowNoProductCTA -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Np, and probably a matter of personal taste but I'd name this event ShowNoProductDialog to be explicit about showing a dialog. CTA sound to me like a button.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point, updated in ba897b7

At first I called it CTA because at the end of the day, there is only one successful path we want merchants to go to (create a product), otherwise the rest of Blaze flow can't be continued. But it did indeed sound weird because the event is showing a dialog, not just a single CTA.

@hafizrahman
Copy link
Contributor Author

I added an extra commit for cleaning up the dialog but it's not affecting anything in the test flow.

@hafizrahman hafizrahman merged commit c1e69ea into trunk Nov 28, 2024
15 checks passed
@hafizrahman hafizrahman deleted the isue/12503-no-product-popup branch November 28, 2024 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: blaze Related to the Blaze project type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"No product found" popup in Blaze creation flow

5 participants