Skip to content

Commit

Permalink
Merge branch 'trunk' into 12731-woo-pos-remove-shadow-from-the-check-…
Browse files Browse the repository at this point in the history
…icon-and-from-the-button-on-the-payment-success-screen
  • Loading branch information
kidinov authored Oct 1, 2024
2 parents 4352fe4 + 2e8c578 commit 9dc5634
Show file tree
Hide file tree
Showing 42 changed files with 103 additions and 366 deletions.
3 changes: 2 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]
*** Use [*****] to indicate smoke tests of all critical flows should be run on the final APK before release (e.g. major library or targetSdk updates).
*** For entries which are touching the Android Wear app's, start entry with `[WEAR]` too.
20.7
20.8
-----
- [**] Improve barcode scanner reading accuracy [https://github.com/woocommerce/woocommerce-android/pull/12673]
- [Internal] AI product creation banner is removed [https://github.com/woocommerce/woocommerce-android/pull/12705]
- [*] [Login] Fix an issue where the app doesn't show the correct error screen when application passwords are disabled [https://github.com/woocommerce/woocommerce-android/pull/12717]
- [**] Fixed bug with coupons disappearing from the order creation screen unexpectedly [https://github.com/woocommerce/woocommerce-android/pull/12724]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ open class Screen {
private fun initializeAppPrefs() {
AppPrefs.init(getInstrumentation().targetContext.applicationContext)

// hide the promo dialog because it breaks the tests
AppPrefs.wasAIProductDescriptionPromoDialogShown = true

// also hide AI description tooltip to make test more simple
AppPrefs.isAIProductDescriptionTooltipDismissed = true

Expand Down
22 changes: 0 additions & 22 deletions WooCommerce/src/main/kotlin/com/woocommerce/android/AppPrefs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@ object AppPrefs {
NOTIFICATIONS_PERMISSION_BAR,
IS_EU_SHIPPING_NOTICE_DISMISSED,
HAS_SAVED_PRIVACY_SETTINGS,
WAS_AI_DESCRIPTION_PROMO_DIALOG_SHOWN,
IS_AI_DESCRIPTION_TOOLTIP_DISMISSED,
NUMBER_OF_TIMES_AI_DESCRIPTION_TOOLTIP_SHOWN,
STORE_CREATION_PROFILER_ANSWERS,
AI_CONTENT_GENERATION_TONE,
AI_PRODUCT_CREATION_IS_FIRST_ATTEMPT,
BLAZE_FIRST_TIME_WITHOUT_CAMPAIGN,
BLAZE_CAMPAIGN_CREATED,
BLAZE_CELEBRATION_SCREEN_SHOWN,
Expand Down Expand Up @@ -976,16 +974,6 @@ object AppPrefs {
value = value
)

var wasAIProductDescriptionPromoDialogShown: Boolean
get() = getBoolean(
key = DeletablePrefKey.WAS_AI_DESCRIPTION_PROMO_DIALOG_SHOWN,
default = false
)
set(value) = setBoolean(
key = DeletablePrefKey.WAS_AI_DESCRIPTION_PROMO_DIALOG_SHOWN,
value = value
)

var isAIProductDescriptionTooltipDismissed: Boolean
get() = getBoolean(
key = DeletablePrefKey.IS_AI_DESCRIPTION_TOOLTIP_DISMISSED,
Expand Down Expand Up @@ -1013,16 +1001,6 @@ object AppPrefs {
value = value.slug
)

var aiProductCreationIsFirstAttempt: Boolean
get() = getBoolean(
key = DeletablePrefKey.AI_PRODUCT_CREATION_IS_FIRST_ATTEMPT,
default = true
)
set(value) = setBoolean(
key = DeletablePrefKey.AI_PRODUCT_CREATION_IS_FIRST_ATTEMPT,
value = value
)

var isBlazeCelebrationScreenShown: Boolean
get() = getBoolean(
key = DeletablePrefKey.BLAZE_CELEBRATION_SCREEN_SHOWN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ import javax.inject.Inject
class AppPrefsWrapper @Inject constructor() {
var savedPrivacyBannerSettings by AppPrefs::savedPrivacySettings

var wasAIProductDescriptionPromoDialogShown by AppPrefs::wasAIProductDescriptionPromoDialogShown

var isAIProductDescriptionTooltipDismissed by AppPrefs::isAIProductDescriptionTooltipDismissed

var aiContentGenerationTone by AppPrefs::aiContentGenerationTone

var aiProductCreationIsFirstAttempt by AppPrefs::aiProductCreationIsFirstAttempt

var isBlazeCelebrationScreenShown by AppPrefs::isBlazeCelebrationScreenShown

var blazeFirstTimeWithoutCampaign by AppPrefs::blazeFirstTimeWithoutCampaign
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardEvent.Fe
import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardEvent.OpenEditWidgets
import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardEvent.OpenRangePicker
import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardEvent.ShareStore
import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardEvent.ShowAIProductDescriptionDialog
import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardEvent.ShowPrivacyBanner
import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardWidgetUiModel
import com.woocommerce.android.ui.google.webview.GoogleAdsWebViewFragment
Expand Down Expand Up @@ -173,11 +172,6 @@ class DashboardFragment :

is ShareStore -> ActivityUtils.shareStoreUrl(requireActivity(), event.storeUrl)

is ShowAIProductDescriptionDialog ->
findNavController().navigateSafely(
DashboardFragmentDirections.actionDashboardToAIProductDescriptionDialogFragment()
)

is OpenEditWidgets -> {
findNavController().navigateSafely(
DashboardFragmentDirections.actionDashboardToEditWidgetsFragment()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.woocommerce.android.analytics.AnalyticsEvent.DYNAMIC_DASHBOARD_CARD_I
import com.woocommerce.android.analytics.AnalyticsEvent.FEATURE_JETPACK_BENEFITS_BANNER
import com.woocommerce.android.analytics.AnalyticsTracker
import com.woocommerce.android.analytics.AnalyticsTrackerWrapper
import com.woocommerce.android.extensions.isEligibleForAI
import com.woocommerce.android.extensions.isSitePublic
import com.woocommerce.android.model.DashboardWidget
import com.woocommerce.android.model.UiString
Expand All @@ -30,7 +29,6 @@ import com.woocommerce.android.ui.dashboard.DashboardViewModel.DashboardWidgetUi
import com.woocommerce.android.ui.dashboard.data.DashboardRepository
import com.woocommerce.android.ui.prefs.privacy.banner.domain.ShouldShowPrivacyBanner
import com.woocommerce.android.util.PackageUtils
import com.woocommerce.android.viewmodel.MultiLiveEvent
import com.woocommerce.android.viewmodel.MultiLiveEvent.Event
import com.woocommerce.android.viewmodel.ResourceProvider
import com.woocommerce.android.viewmodel.ScopedViewModel
Expand Down Expand Up @@ -131,13 +129,6 @@ class DashboardViewModel @Inject constructor(
}
}

if (selectedSite.getOrNull()?.isEligibleForAI == true &&
!appPrefsWrapper.wasAIProductDescriptionPromoDialogShown
) {
triggerEvent(DashboardEvent.ShowAIProductDescriptionDialog)
appPrefsWrapper.wasAIProductDescriptionPromoDialogShown = true
}

updateShareStoreButtonVisibility()
}

Expand Down Expand Up @@ -332,12 +323,10 @@ class DashboardViewModel @Inject constructor(
val showShareStoreButton: Boolean = false,
)

sealed class DashboardEvent : MultiLiveEvent.Event() {
sealed class DashboardEvent : Event() {

data object ShowPrivacyBanner : DashboardEvent()

data object ShowAIProductDescriptionDialog : DashboardEvent()

data class ShareStore(val storeUrl: String) : DashboardEvent()

data object OpenEditWidgets : DashboardEvent()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.woocommerce.android.ui.products.list

import android.view.View
import com.woocommerce.android.viewmodel.MultiLiveEvent

sealed class ProductListEvent : MultiLiveEvent.Event() {
data object ScrollToTop : ProductListEvent()
data object ShowAddProductBottomSheet : ProductListEvent()
data object ShowProductSortingBottomSheet : ProductListEvent()
data class ShowProductFilterScreen(
val stockStatusFilter: String?,
val productTypeFilter: String?,
val productStatusFilter: String?,
val productCategoryFilter: String?,
val selectedCategoryName: String?
) : ProductListEvent()

data class ShowProductUpdateStockStatusScreen(val productsIds: List<Long>) : ProductListEvent()
sealed class ShowUpdateDialog : ProductListEvent() {
abstract val productsIds: List<Long>

data class Price(override val productsIds: List<Long>) : ShowUpdateDialog()
data class Status(override val productsIds: List<Long>) : ShowUpdateDialog()
}

data class ShowDiscardProductChangesConfirmationDialog(
val productId: Long,
val productName: String,
) : ProductListEvent()

data class OpenProduct(
val productId: Long,
val oldPosition: Int,
val newPosition: Int,
val sharedView: View?
) : ProductListEvent()

data object OpenEmptyProduct : ProductListEvent()

data class SelectProducts(val productsIds: List<Long>) : ProductListEvent()
}
Loading

0 comments on commit 9dc5634

Please sign in to comment.