From 096570c5d369431ec17f041011175e64e053cb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irfan=20=C3=96m=C3=BCr?= Date: Fri, 5 Sep 2025 02:13:54 +0300 Subject: [PATCH 1/4] Make HazmatSelectionCard clickable --- .../android/ui/orders/wooshippinglabels/hazmat/HazmatCard.kt | 1 + .../ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatCard.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatCard.kt index 4f7f54f59c3e..0e54faca2bf3 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatCard.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatCard.kt @@ -71,6 +71,7 @@ internal fun HazmatCard( if (selectedCategory != null) { HazmatSelectionCard( selectedCategory = selectedCategory, + onClick = onClick, modifier = Modifier.padding(dimensionResource(id = R.dimen.major_100)) ) } diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt index c612c60caaa7..788abb0527ab 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt @@ -1,6 +1,7 @@ package com.woocommerce.android.ui.orders.wooshippinglabels.hazmat import androidx.compose.foundation.background +import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth @@ -21,6 +22,7 @@ import com.woocommerce.android.ui.orders.shippinglabels.creation.ShippingLabelHa @Composable fun HazmatSelectionCard( selectedCategory: ShippingLabelHazmatCategory, + onClick: OnClick? = null, modifier: Modifier = Modifier ) { Spacer(modifier = Modifier.height(4.dp)) @@ -28,6 +30,7 @@ fun HazmatSelectionCard( Box( modifier = Modifier .fillMaxWidth() + .then(if (onClick == null) Modifier else Modifier.clickable { onClick() }) .background( color = colorResource(R.color.light_colored_button_background), shape = RoundedCornerShape(dimensionResource(R.dimen.corner_radius_large)) From 95f3732633abe38fc6ec987e84d512a469a741a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irfan=20=C3=96m=C3=BCr?= Date: Fri, 5 Sep 2025 02:24:10 +0300 Subject: [PATCH 2/4] Update release notes --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index bc632c10d139..6f3470133713 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -15,6 +15,7 @@ - [*] Add more filter options to orders filters sales channel [https://github.com/woocommerce/woocommerce-android/pull/14546] - [*] Automatically populate the weight field in the create shipment flow [https://github.com/woocommerce/woocommerce-android/pull/14525] - [*] [Shipping Labels] Fixed displaying incorrect hazardous material option for purchased labels [https://github.com/woocommerce/woocommerce-android/pull/14571] +- [*] Enhance the shipping label creation screen by making the selected hazardous box tappable [https://github.com/woocommerce/woocommerce-android/pull/14576] 23.1 ----- From 3c1f1a122aecef139071fda96e534c6baa591bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irfan=20=C3=96m=C3=BCr?= Date: Mon, 8 Sep 2025 19:55:30 +0300 Subject: [PATCH 3/4] Reorder HazmatSelectionCard parameters --- .../ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt index 788abb0527ab..e9cf61812636 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt @@ -22,8 +22,8 @@ import com.woocommerce.android.ui.orders.shippinglabels.creation.ShippingLabelHa @Composable fun HazmatSelectionCard( selectedCategory: ShippingLabelHazmatCategory, + modifier: Modifier = Modifier, onClick: OnClick? = null, - modifier: Modifier = Modifier ) { Spacer(modifier = Modifier.height(4.dp)) Box(modifier = modifier) { From 30982e1ed24d861bb7b67b83bdb86bcbd973be1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Irfan=20=C3=96m=C3=BCr?= Date: Mon, 8 Sep 2025 19:59:45 +0300 Subject: [PATCH 4/4] Fix ripple effect issue on hazmat card --- .../orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt index e9cf61812636..1f8e7baf24cf 100644 --- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt +++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt @@ -12,6 +12,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip import androidx.compose.ui.res.colorResource import androidx.compose.ui.res.dimensionResource import androidx.compose.ui.res.stringResource @@ -30,11 +31,9 @@ fun HazmatSelectionCard( Box( modifier = Modifier .fillMaxWidth() + .clip(RoundedCornerShape(dimensionResource(R.dimen.corner_radius_large))) .then(if (onClick == null) Modifier else Modifier.clickable { onClick() }) - .background( - color = colorResource(R.color.light_colored_button_background), - shape = RoundedCornerShape(dimensionResource(R.dimen.corner_radius_large)) - ) + .background(color = colorResource(R.color.light_colored_button_background)) .padding(16.dp) ) { Text(