woocommerce / woocommerce-android

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

Issue/12894 blaze cta text input #12899

Closed JorgeMucientes closed 1 week ago

JorgeMucientes commented 2 weeks ago

Closes: #12894

⚠️ Depends on FluxC changes

Description

Adds a new input text field in the Blaze campaign creation flow to edit the CTA text of the ad. It also updates the style of the ad CTA to match the Blaze ad style.

Testing information

  1. Log into a site with Blaze enabled
  2. Trigger Blaze campaign creation flow
  3. Once suggestions are loaded, click on Edit Ad button
  4. Check the input text "Call to action" is prefilled for all 3 suggestions.
  5. Edit the value of it and save it
  6. Check the ad preview is updated with the edited value
  7. Create the campaign and load the campaign detail review. Verify the ad CTA shows the value you entered.

The tests that have been performed

The above

Images/gif

https://github.com/user-attachments/assets/990428cf-36bc-4ee0-a1f8-4f89add7a9cb

Changes applied to ad CTA:

https://github.com/user-attachments/assets/d6fd2d68-ee72-459d-b15a-cfc0cb4bfcaa

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 2 weeks ago
1 Warning
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

wpmobilebot commented 2 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
Commit819562f6ad6118f4b4e29bfbae5876c6b5beba2b
Direct Downloadwoocommerce-wear-prototype-build-pr12899-819562f.apk
wpmobilebot commented 2 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
Commit819562f6ad6118f4b4e29bfbae5876c6b5beba2b
Direct Downloadwoocommerce-prototype-build-pr12899-819562f.apk
JorgeMucientes commented 1 week ago

Since the Ad in Blaze web shows the CTA in blue and under the description, I think we should replicate that exact same UI.

Screenshot 2024-11-11 at 10 56 07

I'll proceed to apply those changes in this same PR

wpmobilebot commented 1 week ago

Project dependencies changes

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

list ``` Upgraded Dependencies org.wordpress.fluxc.plugins:woocommerce:trunk-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0, (changed from 2.99.1) org.wordpress.fluxc:fluxc-annotations:trunk-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0, (changed from 2.99.1) org.wordpress:fluxc:trunk-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0, (changed from 2.99.1) ```
tree ```diff -+--- org.wordpress:fluxc:2.99.1 -| +--- 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:2.99.1 -| +--- 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-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0 +| +--- 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-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0 +| +--- 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:2.99.1 - +--- org.wordpress:fluxc:2.99.1 (*) - +--- 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:2.99.1 - +--- androidx.room:room-ktx:2.6.1 (*) - \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*) +\--- org.wordpress.fluxc.plugins:woocommerce:trunk-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0 + +--- org.wordpress:fluxc:trunk-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0 (*) + +--- 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-cc17141a0e910d5b808ba6bbfb4b7d393d3517a0 + +--- androidx.room:room-ktx:2.6.1 (*) + \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 (*) ```
codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 30.76923% with 27 lines in your changes missing coverage. Please review.

Project coverage is 40.19%. Comparing base (c8db73c) to head (819562f). Report is 23 commits behind head on trunk.

Files with missing lines Patch % Lines
...reation/ad/BlazeCampaignCreationEditAdViewModel.kt 8.69% 21 Missing :warning:
...om/woocommerce/android/ui/blaze/BlazeRepository.kt 50.00% 3 Missing :warning:
...n/preview/BlazeCampaignCreationPreviewViewModel.kt 70.00% 0 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #12899 +/- ## ========================================= Coverage 40.18% 40.19% Complexity 5804 5804 ========================================= Files 1259 1259 Lines 71561 71589 +28 Branches 9980 9984 +4 ========================================= + Hits 28760 28773 +13 - Misses 40168 40181 +13 - Partials 2633 2635 +2 ```

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

JorgeMucientes commented 1 week ago

Thanks for the review and the input @hichamboushaba I fixed both of the issues.