woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
321 stars 113 forks source link

[Shipping labels] Use legacy logic for setting origin and destination addresses #14411

Closed rachelmcr closed 1 week ago

rachelmcr commented 1 week ago

Part of: #14393

Description

This updates the Woo Shipping labels flow to set the origin and destination addresses in the same way as the legacy shipping labels flow. This sets up the view model to be better prepared for using these addresses in remote requests (e.g. to get label rates) and ensures consistency with the previous address behavior.

Note that in a future milestone we'll be updating how we set the origin address for the shipping label.

How

Testing information

Prerequisite: The Woo Shipping extension installed and activated, with at least one order with the processing status and a physical product.

  1. Build and run the app with the revampedShippingLabelCreation feature flag enabled.
  2. Go to the Orders tab.
  3. Select an order eligible for a shipping label.
  4. Tap "Create Shipping Label."
  5. Open the Shipment Details bottom sheet and confirm the origin and destination addresses appear as expected.

You can also check an order with a purchased shipping label:

  1. Build and run the app with the revampedShippingLabelCreation feature flag enabled.
  2. Go to the Orders tab.
  3. Select an order with a purchased shipping label.
  4. In the shipping labels section, select "View purchased shipping label."
  5. Open the Shipment Details bottom sheet and confirm the origin and destination addresses appear as expected.

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:

dangermattic commented 1 week ago
1 Warning
:warning: View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.

Generated by :no_entry_sign: Danger

wpmobilebot commented 1 week ago

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

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14411-67adab6
Version21.1
Bundle IDcom.automattic.alpha.woocommerce
Commit67adab6eed06390da79ef16e91d5543572351347
App Center BuildWooCommerce - Prototype Builds #11585

Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.