-
Notifications
You must be signed in to change notification settings - Fork 136
[Shipping Labels] Update the disabled button text on the package selection screen #14558
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
[Shipping Labels] Update the disabled button text on the package selection screen #14558
Conversation
The text of the "Add Package" button in the custom package creation screen is updated to "Add Package Details" when the button is disabled. This change provides users with more context on why the button is disabled, indicating that package details are missing.
The text of the "Add Package" button in the `WooShippingCarrierPackageScreen` now changes based on whether it's enabled or disabled. If the button is disabled, its text changes to "Select a Package".
The text on the "Add package" button in the `WooShippingSavedPackageScreen` is updated to display "Select a Package" when the button is disabled.
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
The release notes are updated to reflect the change in the disabled button text on the package selection screen for shipping labels.
| Text(stringResource(id = R.string.woo_shipping_labels_package_creation_add_package)) | ||
| Text( | ||
| stringResource( | ||
| id = if (isAddPackageEnabled) { |
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.
Since this is a simple UI logic, I made the change here instead of in the ViewModel.
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.
Hmm, I'm not sure about this. Adding it at screen level means we'll need to replicate this if()else{} 3 times instead of having this logic once at viewmodel level. However, I checked current implementation and adding this change at viewmodel level will involve a bigger refactor than I expected. So I'm good with leaving this as proposed 👍🏼
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #14558 +/- ##
=========================================
Coverage 38.29% 38.29%
- Complexity 9619 9620 +1
=========================================
Files 2049 2049
Lines 114781 114781
Branches 15231 15231
=========================================
+ Hits 43951 43952 +1
Misses 66802 66802
+ Partials 4028 4027 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…of-package-buttons
JorgeMucientes
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.
LGTM ![]()
| Text(stringResource(id = R.string.woo_shipping_labels_package_creation_add_package)) | ||
| Text( | ||
| stringResource( | ||
| id = if (isAddPackageEnabled) { |
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.
Hmm, I'm not sure about this. Adding it at screen level means we'll need to replicate this if()else{} 3 times instead of having this logic once at viewmodel level. However, I checked current implementation and adding this change at viewmodel level will involve a bigger refactor than I expected. So I'm good with leaving this as proposed 👍🏼
Part of WOOMOB-12
Description
This updates the disabled button text on the package selection screen to clarify what is missing:
Steps to reproduce
The tests that have been performed
Steps above
Images/gif
RELEASE-NOTES.txtif necessary. Use the "[Internal]" label for non-user-facing changes.