-
Notifications
You must be signed in to change notification settings - Fork 138
Split shipment products UI #13827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split shipment products UI #13827
Conversation
Generated by 🚫 Danger |
| SplitShipmentArgs( | ||
| orderId = navArgs.orderId, | ||
| storeOptions = currentStoreOptions, | ||
| shipments = mapOf(0 to currentShippableItems) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be updated after adding support for multiple shipments
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
| } | ||
| if (isExpanded) { | ||
| repeat(quantity.toInt()) { | ||
| var selection by remember { mutableStateOf(false) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The view model will handle the selection and expandable state in the next PR. I added a local state here to test the UI
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
| import androidx.compose.foundation.layout.sizeIn | ||
| import androidx.compose.foundation.shape.CircleShape | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material.Divider |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material.Divider | ||
| import androidx.compose.material.Icon | ||
| import androidx.compose.material.IconButton |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.lazy.LazyColumn | ||
| import androidx.compose.foundation.lazy.items | ||
| import androidx.compose.material.Icon |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
| import androidx.compose.foundation.lazy.LazyColumn | ||
| import androidx.compose.foundation.lazy.items | ||
| import androidx.compose.material.Icon | ||
| import androidx.compose.material.IconButton |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
| import androidx.compose.foundation.lazy.items | ||
| import androidx.compose.material.Icon | ||
| import androidx.compose.material.IconButton | ||
| import androidx.compose.material.Surface |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
| import androidx.compose.material.Icon | ||
| import androidx.compose.material.IconButton | ||
| import androidx.compose.material.Surface | ||
| import androidx.compose.material.Text |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
| import androidx.compose.material.IconButton | ||
| import androidx.compose.material.Surface | ||
| import androidx.compose.material.Text | ||
| import androidx.compose.material.TopAppBar |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #13827 +/- ##
============================================
- Coverage 38.10% 38.08% -0.03%
Complexity 9256 9256
============================================
Files 2079 2079
Lines 114560 114821 +261
Branches 14593 14637 +44
============================================
+ Hits 43657 43728 +71
- Misses 66936 67122 +186
- Partials 3967 3971 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
irfano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are a few issues I noticed:
- I believe the checkbox for the product group item is intended to select all items. Currently, it’s not functioning that way.
- I think the total item count should reflect the count of all individual items. However, this behavior is the same on the previous screen as well. We can address it for both screens in a separate PR.
- Left padding issue: The left padding of the expanded item is larger than intended. As a result, the expanded and product items appear at different x positions on the screen. Could you please check the Figma file and adjust the paddings accordingly?
| Figma | PR |
|---|---|
![]() |
![]() |
- There’s a minor bottom padding issue.
...lin/com/woocommerce/android/ui/orders/wooshippinglabels/WooShippingLabelCreationViewModel.kt
Show resolved
Hide resolved
This PR focused only on displaying the UI. This more advanced selection behavior is tackled in this PR #13833 |
I will fix this in a different PR |
…ipment-products-ui # Conflicts: # WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/WooShippingLabelCreationViewModel.kt # WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/models/ShippableItemModel.kt
Fixed here 02256d0 |
Fixed here cfb7f30 |
|
@irfano PR is ready for another round |
irfano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comments and addressing my feedback. Great work on this feature. 🚀
I'm approving now but not merging to wait for Thomaz's feedback on the BigDecimal change.
Not at all! I think the BigDecimal adoption here is the best move. Thanks for adding it, @atorresveiga. |
…ipment-products-ui # Conflicts: # WooCommerce/src/main/kotlin/com/woocommerce/android/ui/orders/wooshippinglabels/WooShippingLabelCreationViewModel.kt # WooCommerce/src/main/res/navigation/nav_graph_orders.xml


Part of: #13699
Description
This PR adds support for displaying selectable items in the split shipment flow. The changes included in this PR are:
The changes in this PR focus only on the UI. The selection and expandable state will be added in a different PR
Testing information
The tests that have been performed
Images/gif
Screen_recording_20250321_161104.mp4
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.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: