Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Jul 22, 2025

Closes WOOMOB-627

Description

This PR continues the work in #15932 to improve the experience on the label purchase form:

  • Fetches origin addresses and account settings from storage upon initialization.
  • Updates weight unit and dimension units to use the injected shippingSettingsService.
  • Fetches data from remote asynchronously when cached data are available.
  • Add missing attributes for ShippingLabelAccountSettings to ensure that all data are stored properly.

Testing steps

  1. Log out of the app to clear any cached data.
  2. Log back in to a store with Woo Shipping set up.
  3. Navigate to the Orders tab and open an order eligible for creating shipping labels.
  4. Disconnect the Internet and tap the Create shipping label button.
  5. Confirm that the loading state is displayed and then error state is displayed after requests time out.
  6. Reconnect to the Internet and tap the reload button.
  7. Confirm that data is loaded successfully and the purchase form is displayed.
  8. Close the form and tap the Create shipping label button again.
  9. Confirm that the purchase form is displayed immediately without the loading state.
  10. Edit any Woo Shipping settings on the web (paper size, selected payment method, etc.) then repeat step 8. Confirm that the correct data is displayed after loading the purchase form.

Testing information

  • Tested and confirmed with simulator iPhone 16 iOS 18.4.
  • Updated migration tests and unit tests for the purchase form.

Screenshots

Simulator.Screen.Recording.-.iPhone.16.-.2025-07-22.at.16.39.52.mp4

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@itsmeichigo itsmeichigo added this to the 22.9 milestone Jul 22, 2025
@itsmeichigo itsmeichigo added feature: shipping labels Related to creating, ordering, or printing shipping labels. Enhancement labels Jul 22, 2025
@wpmobilebot
Copy link
Collaborator

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

App NameWooCommerce iOS Prototype
Build Numberpr15935-b5c2853
Version22.8
Bundle IDcom.automattic.alpha.woocommerce
Commitb5c2853
Installation URL2b5ouah9r0mko
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo marked this pull request as ready for review July 22, 2025 10:09
@RafaelKayumov RafaelKayumov self-assigned this Jul 23, 2025
Base automatically changed from woomob-627-revisit-error-handling-for-a-failed-origin-address-load to trunk July 23, 2025 11:11
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 22.9. This milestone is due in less than 2 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

LGTM. Tested, data loading/fetching works as described

@itsmeichigo itsmeichigo merged commit 46c5f23 into trunk Jul 23, 2025
17 checks passed
@itsmeichigo itsmeichigo deleted the woomob-627-load-origin-addresses-from-storage branch July 23, 2025 15:24
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