Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [*] 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]
- [*] Shipping Labels: Updated the disabled button text on the package selection screen [https://github.com/woocommerce/woocommerce-android/pull/14558]
- [*] Enhance the shipping label creation screen by making the selected hazardous box tappable [https://github.com/woocommerce/woocommerce-android/pull/14576]
Copy link
Member

Choose a reason for hiding this comment

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

@irfano it seems we both missed this and the release note was included in 23.2 (as noted by Huong here p1757419135627609/1757414420.859729-slack-C03L1NF1EA3).

Can you create a small PR to fix the release notes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes 🤦🏻‍♂️. I've opened a PR.


23.1
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ internal fun HazmatCard(
if (selectedCategory != null) {
HazmatSelectionCard(
selectedCategory = selectedCategory,
onClick = onClick,
modifier = Modifier.padding(dimensionResource(id = R.dimen.major_100))
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,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
Expand All @@ -21,17 +23,17 @@ import com.woocommerce.android.ui.orders.shippinglabels.creation.ShippingLabelHa
@Composable
fun HazmatSelectionCard(
selectedCategory: ShippingLabelHazmatCategory,
modifier: Modifier = Modifier
modifier: Modifier = Modifier,
onClick: OnClick? = null,
) {
Spacer(modifier = Modifier.height(4.dp))
Box(modifier = modifier) {
Box(
modifier = Modifier
.fillMaxWidth()
.background(
color = colorResource(R.color.light_colored_button_background),
shape = RoundedCornerShape(dimensionResource(R.dimen.corner_radius_large))
)
.clip(RoundedCornerShape(dimensionResource(R.dimen.corner_radius_large)))
.then(if (onClick == null) Modifier else Modifier.clickable { onClick() })
Copy link
Member

Choose a reason for hiding this comment

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

np, I would suggest changing the modifiers a bit to improve the click ripple effect, the following patch achieves a better effect:

patch
Index: WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
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
--- a/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt	(revision 95f3732633abe38fc6ec987e84d512a469a741a8)
+++ b/WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/hazmat/HazmatSelectionCard.kt	(date 1757341157252)
@@ -12,6 +12,7 @@
 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 @@
         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(
Before After
Image Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch, thank you! Applied your patch: 30982e1

.background(color = colorResource(R.color.light_colored_button_background))
.padding(16.dp)
) {
Text(
Expand Down