Skip to content

[Shipping Labels] Improvements to the Customs Form screen #14477

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

Merged
merged 10 commits into from
Aug 19, 2025

Conversation

hichamboushaba
Copy link
Member

Closes WOOMOB-878

Description

This PR adds the following improvements to the Customs Form screen:

  1. Add an info button to the ITN field that opens the official guidelines.
  2. Add an info button the HS tariff field that opens the official guidelines.
  3. Add an info button to the description field that shows a dialog with more information.
  4. Add an info button to the origin country field that shows a dialog with more information.

Note

For the description field, as we are using the material outlined text field, showing the info button next to the label like what we have in Figma and what iOS does is not possible, I instead opted to have it inlined in the end, let me know what you think.

Steps to reproduce

  1. Open an international order.
  2. Open shipping labels creation form.
  3. Open the customs form.

Testing information

  • Confirm all the info buttons work as expected.

The tests that have been performed

The above.

Images/gif

Before After
Screenshot_20250815_183954 Screenshot_20250815_183413
Screenshot_20250815_184000 Screenshot_20250815_183423
  • 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.

@hichamboushaba hichamboushaba changed the base branch from trunk to issue/WOOMOB-878-sl-customs-form-improvements August 15, 2025 17:42
@dangermattic
Copy link
Collaborator

dangermattic commented Aug 15, 2025

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

WooThemeWithBackground {
Surface {
WooShippingCustomsFormScreen(viewModel = viewModel)
CompositionLocalProvider(LocalUriHandler provides chromeTabUriHandler) {
Copy link
Member Author

Choose a reason for hiding this comment

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

For simplicity, I opted to use LocalUriHandler, this allows us to not add more callbacks to the Compose function that already has too many callbacks, but on the other hand this means the ViewModel is not involved here, and we can't unit test this. Personally I think it's fine, but please let me know if you don't agree.

Also, I'm using a custom UriHandler here to use a Chrome custom tab instead of opening the URLs in external browser.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good call!

@hichamboushaba hichamboushaba added type: enhancement A request for an enhancement. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Aug 15, 2025
@hichamboushaba hichamboushaba added this to the 23.1 milestone Aug 15, 2025
@hichamboushaba hichamboushaba marked this pull request as ready for review August 15, 2025 17:45
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 15, 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
Commitb4a9d0b
Direct Downloadwoocommerce-wear-prototype-build-pr14477-b4a9d0b.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Aug 15, 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
Commitb4a9d0b
Direct Downloadwoocommerce-prototype-build-pr14477-b4a9d0b.apk

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 0% with 131 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.94%. Comparing base (9cc9911) to head (b4a9d0b).
⚠️ Report is 127 commits behind head on trunk.

Files with missing lines Patch % Lines
...toms/products/WooShippingCustomsProductListItem.kt 0.00% 113 Missing ⚠️
...abels/components/RoundedBorderDropdownWithLabel.kt 0.00% 15 Missing ⚠️
.../android/ui/compose/component/WCOutlinedSpinner.kt 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #14477      +/-   ##
============================================
- Coverage     37.97%   37.94%   -0.04%     
  Complexity     9261     9261              
============================================
  Files          2004     2004              
  Lines        112748   112849     +101     
  Branches      14887    14910      +23     
============================================
- Hits          42819    42818       -1     
- Misses        66018    66120     +102     
  Partials       3911     3911              

☔ 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 self-assigned this Aug 18, 2025
Base automatically changed from issue/WOOMOB-878-sl-customs-form-improvements to trunk August 18, 2025 14:18
@hichamboushaba hichamboushaba requested a review from irfano August 18, 2025 18:26
@hichamboushaba
Copy link
Member Author

Thanks @irfano, ready for another round.

Copy link
Contributor

@irfano irfano left a comment

Choose a reason for hiding this comment

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

Thanks, Hicham! LGTM! 🚢

@hichamboushaba hichamboushaba force-pushed the issue/WOOMOB-878-sl-customs-form-improvements-2 branch from c650a65 to b4a9d0b Compare August 19, 2025 09:50
@hichamboushaba hichamboushaba merged commit 44aae19 into trunk Aug 19, 2025
17 checks passed
@hichamboushaba hichamboushaba deleted the issue/WOOMOB-878-sl-customs-form-improvements-2 branch August 19, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: shipping labels Related to creating, ordering, or printing shipping labels. type: enhancement A request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants