-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Shipping Labels Revamp] Introduce hazmat initial navigation and screen #13784
Conversation
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.view.ViewGroup | ||
import androidx.compose.material.Surface |
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 #13784 +/- ##
=========================================
Coverage 38.10% 38.11%
- Complexity 9256 9260 +4
=========================================
Files 2079 2080 +1
Lines 114560 114579 +19
Branches 14593 14593
=========================================
+ Hits 43657 43672 +15
- Misses 66936 66940 +4
Partials 3967 3967 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Version |
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 dividing this feature into multiple PRs. I’ve added some comments on the code and noticed two issues:
- The screen isn't readable in dark mode.

- The screen needs to be scrollable. With the increased font size, some text isn’t readable. This issue will become more noticeable as additional footer text is added.

fun WooShippingLabelHazmatFormScreen(viewModel: WooShippingLabelHazmatFormViewModel) { | ||
val viewState by viewModel.viewState.observeAsState() | ||
WooShippingLabelHazmatFormScreen( | ||
containsHazmatChecked = viewState?.containsHazmatChecked ?: 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.
Equality check can be used instead of elvis for nullable boolean check
The IDE displays this warning, and I agree that using == true
is better than perming a null
check. Please consider updating it.
viewModel.onSelectCategoryClick() | ||
|
||
// Then | ||
assertThat(capturedEvent).isNotNull() |
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.
I think the line checking isNotNull()
is redundant since the next line already verifies that capturedEvent
is not null.
48d9240
to
cb73765
Compare
Hey @irfano! Thanks for your careful review. I addressed all of your suggestions and the PR is ready for a second round. |
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 the changes, Thomaz. Looks great. 👍🏻
Why
Fixes issue #13706. As the Shipping Labels must support the HAZMAT declarations, we should implement a proper flow for the pending Hazardous Materials question standing the main form that's currently a no-op.
How
This PR introduces the initial Hazmat base form with the Composable Screen, ViewModel, and Fragment, while also wires the navigation action of the HAZMAT button in the main creation flow.
Screen Capture
Screen_recording_20250318_202921.mp4
How to Test
Select Category
buttonUpdate release notes:
RELEASE-NOTES.txt
if necessary.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: