Closed rachelmcr closed 1 week ago
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
App Name | WooCommerce iOS | |
Build Number | pr14412-5756d86 | |
Version | 21.1 | |
Bundle ID | com.automattic.alpha.woocommerce | |
Commit | 5756d86bb926060977e52e62cac74eee71beb228 | |
App Center Build | WooCommerce - Prototype Builds #11586 |
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
Closes: #14393 ⚠️ Based on https://github.com/woocommerce/woocommerce-ios/pull/14411 ⚠️
Description
This adds support for loading the shipping label rates from remote in the Woo Shipping label flow. New behavior:
Note that viewing the shipping service section still requires (for now) testing code to set the selected package.
How
WooShippingServiceViewModel
now makes a remote request to load the label rates when it is initialized:init
method now takes the required parameters for the remote request, and sets the loading state with placeholder values.init
method also calls a new method to make the remote request. After receiving the response, it updates the available rates, regenerates the service tabs and rates, and sets the loading state.WooShippingServiceView
now shows a shimmering, redacted placeholder view while the rates are loading.WooShippingCreateLabelsViewModel
is updated to set the shipping service view model after a package is selected. This introduces aselectedPackage
property we can set in the package selection flow.ShippingLabelPackageSelected
is now copiable for ease of unit testing.Testing information
Prerequisite: The Woo Shipping extension installed and activated, with at least one order with the
processing
status and a physical product.WooShippingCreateLabelsViewModel
to provide a value forselectedPackage
that can be used in the remote request.revampedShippingLabelCreation
feature flag enabled.Screenshots
https://github.com/user-attachments/assets/5013282b-9fed-43fc-b223-3c8e5b670fdd
RELEASE-NOTES.txt
if necessary.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: