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

Issue/12750 blaze survey #12761

Merged
merged 14 commits into from
Oct 3, 2024
Merged

Issue/12750 blaze survey #12761

merged 14 commits into from
Oct 3, 2024

Conversation

JorgeMucientes
Copy link
Contributor

@JorgeMucientes JorgeMucientes commented Oct 3, 2024

Closes: #12750

⚠️ Requires these FluxC changes to work

Description

Adds a new feedback request UI component in Blaze campaign creation success bottom sheet. Upon interacting with either 👍🏼 or 👎🏼 from the feedback component, a survey webview will be displayed

Steps to reproduce

Testing information

Apply this patch to disable the Objective feature flag and be able to create a campaign without setting a mandatory objective value:

Subject: [PATCH] Disable Objective feature flag in debug
---
Index: WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt
--- a/WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt	(revision c24bfbad0ba216ce633a385bb80b89cf3712bf2d)
+++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/util/FeatureFlag.kt	(date 1727972939935)
@@ -25,11 +25,11 @@
                 PackageUtils.isDebugBuild() || context != null && PackageUtils.isBetaBuild(context)
             }
 
+            OBJECTIVE_SECTION -> false
             WC_SHIPPING_BANNER,
             BETTER_CUSTOMER_SEARCH_M2,
             ORDER_CREATION_AUTO_TAX_RATE,
-            REVAMP_WOO_SHIPPING,
-            OBJECTIVE_SECTION -> PackageUtils.isDebugBuild()
+            REVAMP_WOO_SHIPPING -> PackageUtils.isDebugBuild()
 
             NEW_SHIPPING_SUPPORT,
             INBOX,
  1. Create a Blaze campaign
  2. In the success bottom sheet click on any of the 👍🏼 or 👎🏼
  3. Check the survey is loaded
  4. Check in the Android logcat the following log:
    🔵 Tracked: blaze_campaign_creation_feedback, Properties: {"satisfied":true...

The tests that have been performed

The above ☝🏼. Created a Blaze campaign and opened the survey form

Images/gif

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

@JorgeMucientes JorgeMucientes added this to the 20.7 milestone Oct 3, 2024
@JorgeMucientes JorgeMucientes added the feature: blaze Related to the Blaze project label Oct 3, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Oct 3, 2024

2 Warnings
⚠️ Class ShouldShowFeedbackRequest is missing tests, but unit-tests-exemption label was set to ignore this.
⚠️ This PR is assigned to the milestone 20.7. 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.
1 Message
📖

This PR contains changes to Tracks-related logic. Please ensure (author and reviewer) the following are completed:

  • The tracks events must be validated in the Tracks system.
  • Verify the internal Tracks spreadsheet has also been updated.
  • Please consider registering any new events.
  • The PR must be assigned the category: tracks label.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 3, 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
Commit7b6ab39
Direct Downloadwoocommerce-wear-prototype-build-pr12761-7b6ab39.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 3, 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
Commit7b6ab39
Direct Downloadwoocommerce-prototype-build-pr12761-7b6ab39.apk

While objective feature is WIP we were sending objective = "" in the create campaign request. Empty values are not allowed for this field. So until the feature is finished we must avoid sending the objective value at all in the create campaign request.
@JorgeMucientes JorgeMucientes added the status: do not merge Dependent on another PR, ready for review but not ready for merge. label Oct 3, 2024
@JorgeMucientes JorgeMucientes requested a review from irfano October 3, 2024 17:13
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 3, 2024

Project dependencies changes

The following changes in project dependencies were detected (configuration vanillaReleaseRuntimeClasspath):

list
Upgraded Dependencies
org.wordpress.fluxc.plugins:woocommerce:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007, (changed from trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056)
org.wordpress.fluxc:fluxc-annotations:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007, (changed from trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056)
org.wordpress:fluxc:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007, (changed from trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056)
tree
-+--- org.wordpress:fluxc:trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056
-|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.25
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
-|    +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6
-|    |    \--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
-|    +--- androidx.security:security-crypto:1.0.0 -> 1.1.0-alpha03
-|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
-|    |    +--- com.google.crypto.tink:tink-android:1.5.0
-|    |    \--- androidx.collection:collection:1.1.0 -> 1.4.0 (*)
-|    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0
-|    |    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.10 (*)
-|    +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-|    +--- org.apache.commons:commons-text:1.10.0 (*)
-|    +--- androidx.room:room-runtime:2.6.1 (*)
-|    +--- androidx.room:room-ktx:2.6.1
-|    |    +--- androidx.room:room-common:2.6.1 (*)
-|    |    +--- androidx.room:room-runtime:2.6.1 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*)
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 -> 1.8.1 (*)
-|    |    +--- androidx.room:room-common:2.6.1 (c)
-|    |    \--- androidx.room:room-runtime:2.6.1 (c)
-|    +--- com.google.dagger:dagger:2.51.1
-|    |    \--- javax.inject:javax.inject:1
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
-|    +--- org.wordpress:wellsql:2.0.0
-|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
-|    |    \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
-|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056
-|    +--- org.greenrobot:eventbus:3.3.1 (*)
-|    +--- org.greenrobot:eventbus-java:3.3.1
-|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
-|    +--- com.android.volley:volley:1.1.1 -> 1.2.0
-|    +--- androidx.paging:paging-runtime:2.1.2
-|    |    +--- androidx.paging:paging-common:2.1.2
-|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.8.0 (*)
-|    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
-|    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
-|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.7.0 (*)
-|    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.7.0 (*)
-|    |    \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
-|    +--- com.goterl:lazysodium-android:5.0.2
-|    +--- net.java.dev.jna:jna:5.5.0
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
++--- org.wordpress:fluxc:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007
+|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.9.25
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
+|    +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6
+|    |    \--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
+|    +--- androidx.security:security-crypto:1.0.0 -> 1.1.0-alpha03
+|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
+|    |    +--- com.google.crypto.tink:tink-android:1.5.0
+|    |    \--- androidx.collection:collection:1.1.0 -> 1.4.0 (*)
+|    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0
+|    |    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.10 (*)
+|    +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
+|    +--- org.apache.commons:commons-text:1.10.0 (*)
+|    +--- androidx.room:room-runtime:2.6.1 (*)
+|    +--- androidx.room:room-ktx:2.6.1
+|    |    +--- androidx.room:room-common:2.6.1 (*)
+|    |    +--- androidx.room:room-runtime:2.6.1 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 1.9.25 (*)
+|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 -> 1.8.1 (*)
+|    |    +--- androidx.room:room-common:2.6.1 (c)
+|    |    \--- androidx.room:room-runtime:2.6.1 (c)
+|    +--- com.google.dagger:dagger:2.51.1
+|    |    \--- javax.inject:javax.inject:1
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
+|    +--- org.wordpress:wellsql:2.0.0
+|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.0 (*)
+|    |    \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
+|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007
+|    +--- org.greenrobot:eventbus:3.3.1 (*)
+|    +--- org.greenrobot:eventbus-java:3.3.1
+|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
+|    +--- com.android.volley:volley:1.1.1 -> 1.2.0
+|    +--- androidx.paging:paging-runtime:2.1.2
+|    |    +--- androidx.paging:paging-common:2.1.2
+|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.8.0 (*)
+|    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
+|    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
+|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.7.0 (*)
+|    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.7.0 (*)
+|    |    \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
+|    +--- com.goterl:lazysodium-android:5.0.2
+|    +--- net.java.dev.jna:jna:5.5.0
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
-\--- org.wordpress.fluxc.plugins:woocommerce:trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056
-     +--- org.wordpress:fluxc:trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056 (*)
-     +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-     +--- com.google.dagger:dagger:2.51.1 (*)
-     +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
-     +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
-     +--- androidx.room:room-runtime:2.6.1 (*)
-     +--- org.wordpress:wellsql:2.0.0 (*)
-     +--- org.wordpress.fluxc:fluxc-annotations:trunk-373bc6d30f8d9da6b7750f3ddc38929611b50056
-     +--- androidx.room:room-ktx:2.6.1 (*)
-     \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)
+\--- org.wordpress.fluxc.plugins:woocommerce:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007
+     +--- org.wordpress:fluxc:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007 (*)
+     +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
+     +--- com.google.dagger:dagger:2.51.1 (*)
+     +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
+     +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
+     +--- androidx.room:room-runtime:2.6.1 (*)
+     +--- org.wordpress:wellsql:2.0.0 (*)
+     +--- org.wordpress.fluxc:fluxc-annotations:trunk-7ad6ce4c250ba435d8d8c7feb898bceb259fb007
+     +--- androidx.room:room-ktx:2.6.1 (*)
+     \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*)

@irfano irfano self-assigned this Oct 3, 2024
Copy link
Contributor

@irfano irfano left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻 I added only a minor suggestion.

@JorgeMucientes
Copy link
Contributor Author

Thanks for the review @irfano. I've applied your suggestion 👍🏼

@JorgeMucientes JorgeMucientes added status: do not merge Dependent on another PR, ready for review but not ready for merge. category: tracks Related to analytics, including Tracks Events. and removed status: do not merge Dependent on another PR, ready for review but not ready for merge. labels Oct 3, 2024
@JorgeMucientes JorgeMucientes added unit-tests-exemption and removed status: do not merge Dependent on another PR, ready for review but not ready for merge. labels Oct 3, 2024
@JorgeMucientes JorgeMucientes merged commit 2cbe776 into trunk Oct 3, 2024
17 of 20 checks passed
@JorgeMucientes JorgeMucientes deleted the issue/12750-blaze-survey branch October 3, 2024 21:38
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 3.33333% with 29 lines in your changes missing coverage. Please review.

Project coverage is 40.73%. Comparing base (fa28ff0) to head (7b6ab39).
Report is 46 commits behind head on trunk.

Files with missing lines Patch % Lines
...reation/success/BlazeCampaignSuccessBottomSheet.kt 0.00% 20 Missing ⚠️
...laze/creation/success/ShouldShowFeedbackRequest.kt 0.00% 4 Missing ⚠️
...e/android/ui/products/ProductSharingBottomSheet.kt 0.00% 3 Missing ⚠️
...om/woocommerce/android/ui/blaze/BlazeRepository.kt 0.00% 0 Missing and 1 partial ⚠️
...ocommerce/android/ui/compose/component/Feedback.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #12761      +/-   ##
============================================
- Coverage     40.75%   40.73%   -0.02%     
  Complexity     5738     5738              
============================================
  Files          1233     1234       +1     
  Lines         69527    69553      +26     
  Branches       9640     9644       +4     
============================================
  Hits          28335    28335              
- Misses        38581    38606      +25     
- Partials       2611     2612       +1     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tracks Related to analytics, including Tracks Events. feature: blaze Related to the Blaze project unit-tests-exemption
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crowsignal survey
5 participants