Skip to content

Conversation

@atorresveiga
Copy link
Contributor

@atorresveiga atorresveiga commented Nov 29, 2024

Parto of: #12998

Description

This PR supports connecting the ship to and ship from addresses to the creating shipping labels UI. To achieve this, I created the new model OriginShippingAddress and introduced the new use case ObserveOriginAddresses. The new use case uses mock data with a delay to pretend the app is busy fetching the address data. Full address support is planned for M2, so I'm currently skipping testing for this new use case.

I updated the WooShippingLabelCreationViewModel to utilize the new use case and accurately represent the screen state with the order's information.

Testing information

Before

  1. Crete two orders one with customer information and a shipping address and another without the shipping address information. The orders should be in the Processing status.

TC1

  1. Open the app
  2. Navigate to the orders screen
  3. Tap on the order with the shipping address information
  4. Expand the Shipment details section
  5. Check that the Ship to section is the expected

*The ship from the section is operational but uses a different control to change the ship's address. Full support with the expected bottom sheet control will be added in M2.

TC2

  1. Open the app
  2. Navigate to the orders screen
  3. Tap on the order without the shipping address information
  4. Expand the Shipment details section
  5. Check that the Ship to section is the expected (empty)

TC3

  1. Check that TC1 and TC2 are also working as expected on landscape

The tests that have been performed

  1. Check that the UI is working as expected

Images/gif

Screen_recording_20241209_203913.mp4
  • 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.

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:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@dangermattic
Copy link
Collaborator

dangermattic commented Nov 29, 2024

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

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 29, 2024

📲 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
Commit394ed98
Direct Downloadwoocommerce-wear-prototype-build-pr13036-394ed98.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 29, 2024

📲 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
Commit394ed98
Direct Downloadwoocommerce-prototype-build-pr13036-394ed98.apk

@atorresveiga atorresveiga changed the title Issue/12998 connecting addresses Shipping labels: Connecting addresses Dec 9, 2024
@atorresveiga atorresveiga added type: task An internally driven task. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Dec 9, 2024
@atorresveiga atorresveiga added this to the 21.3 milestone Dec 9, 2024
@atorresveiga atorresveiga marked this pull request as ready for review December 9, 2024 23:41
@atorresveiga atorresveiga mentioned this pull request Dec 9, 2024
5 tasks
@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 16.20553% with 212 lines in your changes missing coverage. Please review.

Project coverage is 40.43%. Comparing base (9731223) to head (394ed98).
Report is 14 commits behind head on trunk.

Files with missing lines Patch % Lines
...roid/ui/orders/wooshippinglabels/AddressSection.kt 0.00% 116 Missing ⚠️
...orders/wooshippinglabels/ObserveOriginAddresses.kt 0.00% 49 Missing ⚠️
...oid/ui/orders/wooshippinglabels/ShipmentDetails.kt 0.00% 35 Missing ⚠️
...hippinglabels/WooShippingLabelCreationViewModel.kt 68.42% 11 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13036      +/-   ##
============================================
- Coverage     40.49%   40.43%   -0.06%     
- Complexity     6188     6192       +4     
============================================
  Files          1287     1289       +2     
  Lines         74207    74394     +187     
  Branches      10156    10172      +16     
============================================
+ Hits          30050    30082      +32     
- Misses        41549    41703     +154     
- Partials       2608     2609       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@atorresveiga atorresveiga merged commit 1356c7a into trunk Dec 10, 2024
16 of 19 checks passed
@atorresveiga atorresveiga deleted the issue/12998-connecting-addresses branch December 10, 2024 00:34
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: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants