Skip to content

Conversation

@irfano
Copy link
Contributor

@irfano irfano commented Sep 3, 2025

Part of WOOMOB-12

Description

This updates the disabled button text on the package selection screen to clarify what is missing:

  • On the Custom tab, the disabled button will display “Add Package Details.”
  • On the Carrier and Saved tabs, it will display “Select a Package.”

Steps to reproduce

  1. Go to Orders.
  2. Select an order that is eligible to create shipping labels.
  3. Tap "Create shipping label" button.
  4. Tap "Select a Package" button.
  5. Navigate between tabs.

The tests that have been performed

Steps above

Images/gif

Before After
Screenshot_20250903_161339 after-custom
before-carrier after-carrier
before-saved after-saved
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

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.
@irfano irfano added this to the 23.2 milestone Sep 3, 2025
@irfano irfano added feature: shipping labels Related to creating, ordering, or printing shipping labels. Enhancement labels Sep 3, 2025
@irfano irfano changed the title [Shipping Labels] update disabled state text of package buttons [Shipping Labels] Update the disabled button text on the package selection screen Sep 3, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 3, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit10992d7
Direct Downloadwoocommerce-wear-prototype-build-pr14558-10992d7.apk

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) {
Copy link
Contributor Author

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.

Copy link
Contributor

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 👍🏼

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 3, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit10992d7
Direct Downloadwoocommerce-prototype-build-pr14558-10992d7.apk

@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.29%. Comparing base (c5eddf4) to head (10992d7).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@irfano irfano modified the milestones: 23.2, 23.3 Sep 5, 2025
@JorgeMucientes JorgeMucientes self-assigned this Sep 8, 2025
Copy link
Contributor

@JorgeMucientes JorgeMucientes left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

Text(stringResource(id = R.string.woo_shipping_labels_package_creation_add_package))
Text(
stringResource(
id = if (isAddPackageEnabled) {
Copy link
Contributor

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 👍🏼

@JorgeMucientes JorgeMucientes merged commit 986909c into trunk Sep 8, 2025
18 of 19 checks passed
@JorgeMucientes JorgeMucientes deleted the issue/WOOMOB-12-update-disabled-state-text-of-package-buttons branch September 8, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement feature: shipping labels Related to creating, ordering, or printing shipping labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants