Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:woocommerce/woocommerce-android in…
Browse files Browse the repository at this point in the history
…to ci/enable-dependency-cache-on-ci-final
  • Loading branch information
ParaskP7 committed Jan 17, 2025
2 parents ead005b + df4ac5a commit 25a6483
Show file tree
Hide file tree
Showing 50 changed files with 678 additions and 535 deletions.
2 changes: 2 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
*** For entries which are touching the Android Wear app's, start entry with `[WEAR]` too.
21.5
-----
- [**] Enhanced WebView to dynamically scale receipt content, ensuring optimal fit across all device screen sizes. [https://github.com/woocommerce/woocommerce-android/pull/13266]
- [*] Fixes missing text in Blaze Campaigns card on larger display and font sizes [https://github.com/woocommerce/woocommerce-android/pull/13300]
- [*] Puerto Rico is now available in the list of countries that are supported by in-person payments [https://github.com/woocommerce/woocommerce-android/pull/13200]
- [*] Removed the outdated feedback survey for shipping labels [https://github.com/woocommerce/woocommerce-android/pull/13319]

21.4
-----
Expand Down
11 changes: 8 additions & 3 deletions WooCommerce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def versionProperties = loadPropertiesFromFile(file("${rootDir}/version.properti
android {
namespace "com.woocommerce.android"

compileSdkVersion gradle.ext.compileSdkVersion
compileSdk gradle.ext.compileSdkVersion

defaultConfig {
applicationId "com.woocommerce.android"
Expand Down Expand Up @@ -489,8 +489,13 @@ task copyGoogleServicesExampleFile(type: Copy) {
android.buildTypes.all { buildType ->
(secretProperties + developerProperties).any { property ->
if (property.key.toLowerCase().startsWith("wc.")) {
buildType.buildConfigField "String", property.key.replace("wc.", "").replace(".", "_").toUpperCase(),
"\"${property.value}\""
if (property.value == "true" || property.value == "false") {
buildType.buildConfigField "boolean", property.key.replace("wc.", "").replace(".", "_").toUpperCase(),
property.value
} else {
buildType.buildConfigField "String", property.key.replace("wc.", "").replace(".", "_").toUpperCase(),
"\"${property.value}\""
}
}
if (property.key.toLowerCase().startsWith("wc.res.")) {
buildType.resValue "string", property.key.replace("wc.res.", "").replace(".", "_").toLowerCase(),
Expand Down
3 changes: 2 additions & 1 deletion WooCommerce/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,11 @@
tools:replace="android:screenOrientation" />
<activity
android:name="com.woocommerce.android.ui.woopos.root.WooPosActivity"
android:theme="@style/Theme.WooPos"
android:exported="false" />
<activity
android:name="com.woocommerce.android.ui.woopos.cardreader.WooPosCardReaderActivity"
android:theme="@style/Theme.Woo.Transparent" />
android:theme="@style/Theme.WooPos.Transparent" />

<!-- Stats today app widget -->
<meta-data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ object AppUrls {

const val CROWDSIGNAL_MAIN_SURVEY = "https://automattic.survey.fm/woo-app-general-feedback-user-survey"
const val CROWDSIGNAL_PRODUCT_SURVEY = "https://automattic.survey.fm/woo-app-feature-feedback-products"
const val CROWDSIGNAL_SHIPPING_LABELS_SURVEY =
"https://automattic.survey.fm/woo-app-feature-feedback-shipping-labels"

const val CROWDSIGNAL_ANALYTICS_HUB_SURVEY = "https://automattic.survey.fm/woo-app-analytics-hub-production"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ class AnalyticsTracker private constructor(
const val VALUE_FEEDBACK_CANCELED = "canceled"
const val VALUE_FEEDBACK_DISMISSED = "dismissed"
const val VALUE_FEEDBACK_GIVEN = "gave_feedback"
const val VALUE_SHIPPING_LABELS_M4_FEEDBACK = "shipping_labels_m4"
const val VALUE_PRODUCT_ADDONS_FEEDBACK = "product_addons"
const val VALUE_ANALYTICS_HUB_FEEDBACK = "analytics_hub"
const val VALUE_ORDER_SHIPPING_LINES_FEEDBACK = "order_shipping_lines"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ data class FeatureFeedbackSettings(
}

enum class Feature {
SHIPPING_LABEL_M4,
PRODUCT_ADDONS,
SIMPLE_PAYMENTS_AND_ORDER_CREATION,
ANALYTICS_HUB,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ data class Order(
.firstOrNull()?.groupValues
?.takeIf { it.size == addonAttributeGroupSize }
?.toMutableList()
?.apply { removeFirst() }
?.apply { removeAt(0) }

@IgnoredOnParcel
val addonName = keyAsAddonRegexGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.FloatingActionButton
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ModalBottomSheetLayout
import androidx.compose.material.ModalBottomSheetValue
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons.Filled
Expand Down Expand Up @@ -51,6 +50,7 @@ import com.woocommerce.android.ui.blaze.campaigs.BlazeCampaignListViewModel.Clic
import com.woocommerce.android.ui.compose.component.BottomSheetHandle
import com.woocommerce.android.ui.compose.component.InfiniteListHandler
import com.woocommerce.android.ui.compose.component.WCColoredButton
import com.woocommerce.android.ui.compose.component.WCModalBottomSheetLayout

@Composable
fun BlazeCampaignListScreen(viewModel: BlazeCampaignListViewModel) {
Expand Down Expand Up @@ -91,7 +91,7 @@ private fun BlazeCampaignListScreen(
}
}

ModalBottomSheetLayout(
WCModalBottomSheetLayout(
sheetState = bottomSheetState,
sheetContent = {
CampaignCelebrationSheet(onCampaignCelebrationDismissed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,42 +115,42 @@ private fun CampaignBudgetScreen(
skipHalfExpanded = true,
)

Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onBackPressed,
navigationIcon = Icons.AutoMirrored.Filled.ArrowBack
)
},
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
WCModalBottomSheetLayout(
sheetState = modalSheetState,
sheetContent = {
Column {
Spacer(modifier = Modifier.height(dimensionResource(id = dimen.minor_100)))
BottomSheetHandle(Modifier.align(Alignment.CenterHorizontally))
when {
state.showImpressionsBottomSheet -> ImpressionsInfoBottomSheet(
onDoneTapped = { coroutineScope.launch { modalSheetState.hide() } }
)
WCModalBottomSheetLayout(
sheetState = modalSheetState,
sheetContent = {
Column {
Spacer(modifier = Modifier.height(dimensionResource(id = dimen.minor_100)))
BottomSheetHandle(Modifier.align(Alignment.CenterHorizontally))
when {
state.showImpressionsBottomSheet -> ImpressionsInfoBottomSheet(
onDoneTapped = { coroutineScope.launch { modalSheetState.hide() } }
)

state.showCampaignDurationBottomSheet -> EditDurationBottomSheet(
budgetUiState = state,
onStartDateChanged = { onStartDateChanged(it) },
onApplyTapped = { duration, isEndlessCampaign, startDate ->
onApplyDurationTapped(duration, isEndlessCampaign, startDate)
coroutineScope.launch { modalSheetState.hide() }
},
onCancelTapped = { coroutineScope.launch { modalSheetState.hide() } },
onDurationSliderUpdated = { duration, startDate ->
onDurationSliderUpdated(duration, startDate)
}
)
}
state.showCampaignDurationBottomSheet -> EditDurationBottomSheet(
budgetUiState = state,
onStartDateChanged = { onStartDateChanged(it) },
onApplyTapped = { duration, isEndlessCampaign, startDate ->
onApplyDurationTapped(duration, isEndlessCampaign, startDate)
coroutineScope.launch { modalSheetState.hide() }
},
onCancelTapped = { coroutineScope.launch { modalSheetState.hide() } },
onDurationSliderUpdated = { duration, startDate ->
onDurationSliderUpdated(duration, startDate)
}
)
}
}
) {
}
) {
Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onBackPressed,
navigationIcon = Icons.AutoMirrored.Filled.ArrowBack
)
},
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
Column(
modifier = Modifier
.padding(paddingValues)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package com.woocommerce.android.ui.blaze.creation.destination
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imeNestedScroll
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -27,13 +29,13 @@ import com.woocommerce.android.R
import com.woocommerce.android.ui.blaze.creation.destination.BlazeCampaignCreationAdDestinationParametersViewModel.ViewState
import com.woocommerce.android.ui.blaze.creation.destination.BlazeCampaignCreationAdDestinationParametersViewModel.ViewState.ParameterBottomSheetState.Editing
import com.woocommerce.android.ui.compose.component.BottomSheetHandle
import com.woocommerce.android.ui.compose.component.ModalStatusBarBottomSheetLayout
import com.woocommerce.android.ui.compose.component.WCColoredButton
import com.woocommerce.android.ui.compose.component.WCModalBottomSheetLayout
import com.woocommerce.android.ui.compose.component.WCOutlinedTextField
import com.woocommerce.android.ui.compose.preview.LightDarkThemePreviews
import com.woocommerce.android.ui.compose.theme.WooThemeWithBackground

@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterialApi::class, ExperimentalLayoutApi::class)
@Composable
fun AdDestinationParametersBottomSheet(
viewState: ViewState,
Expand All @@ -56,7 +58,7 @@ fun AdDestinationParametersBottomSheet(
}
}

ModalStatusBarBottomSheetLayout(
WCModalBottomSheetLayout(
sheetState = modalSheetState,
sheetShape = RoundedCornerShape(topStart = roundedCornerRadius, topEnd = roundedCornerRadius),
sheetContent = {
Expand All @@ -65,10 +67,12 @@ fun AdDestinationParametersBottomSheet(
paramsState = viewState.bottomSheetState,
onParameterChanged = onParameterChanged,
onParameterSaved = onParameterSaved,
modifier = modifier.fillMaxWidth()
modifier = modifier
.fillMaxWidth()
)
}
}
},
modifier = Modifier.imeNestedScroll(),
) {
screenContent()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import com.woocommerce.android.ui.compose.component.WCColoredButton
import com.woocommerce.android.ui.compose.component.WCModalBottomSheetLayout
import com.woocommerce.android.ui.compose.component.WCTextButton
import com.woocommerce.android.ui.compose.theme.WooThemeWithBackground
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch

@Composable
Expand All @@ -78,41 +79,40 @@ fun BlazeCampaignCreationIntroScreen(
onDismissClick: () -> Unit,
onLearnMoreClick: () -> Unit,
) {
Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onDismissClick,
navigationIcon = Icons.Default.Clear
val coroutineScope = rememberCoroutineScope()
val modalSheetState = rememberModalBottomSheetState(
initialValue = Hidden,
confirmValueChange = { it != HalfExpanded },
skipHalfExpanded = true
)

WCModalBottomSheetLayout(
sheetContent = {
BlazeCampaignBottomSheetContent(
onDismissClick = {
coroutineScope.launch { modalSheetState.hide() }
}
)
},
sheetState = modalSheetState,
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
val coroutineScope = rememberCoroutineScope()
val modalSheetState = rememberModalBottomSheetState(
initialValue = Hidden,
confirmValueChange = { it != HalfExpanded },
skipHalfExpanded = true
)

WCModalBottomSheetLayout(
sheetContent = {
BlazeCampaignBottomSheetContent(
onDismissClick = {
coroutineScope.launch { modalSheetState.hide() }
}
) {
Scaffold(
topBar = {
Toolbar(
onNavigationButtonClick = onDismissClick,
navigationIcon = Icons.Default.Clear
)
},
sheetState = modalSheetState,
modifier = Modifier
.background(MaterialTheme.colors.surface)
.padding(paddingValues)
) {
modifier = Modifier.background(MaterialTheme.colors.surface)
) { paddingValues ->
BlazeCampaignCreationIntroContent(
onContinueClick = onContinueClick,
onLearnMoreClick = {
coroutineScope.launch { modalSheetState.show() }
onLearnMoreClick()
}
},
modifier = Modifier.padding(paddingValues)
)
}
}
Expand Down
Loading

0 comments on commit 25a6483

Please sign in to comment.