Skip to content
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

[Shipping labels] Add "missing address" label and notice for destination address #15081

Merged
merged 4 commits into from
Feb 7, 2025

Conversation

rachelmcr
Copy link
Contributor

@rachelmcr rachelmcr commented Feb 6, 2025

Part of: #13783

Description

This updates the destination address label and notice to handle when the destination address is missing.

It also observes the notice to remove it after a delay when the destination address is verified (per the designs), although this isn't used yet.

Changes

  • In the view model:
    • We now have 3 cases for the destination address status (verified, unverified, and missing).
    • For a new shipping label, we set it to unverified unless there are no address details to display, in which case it is set to missing. (A future task will check the remote status and set it to verified if it has been remotely verified.)
    • For an existing shipping label, we set it to verified.
    • We observe the status and set the corresponding notice label, which is used in the view to display the notice.
    • We also observe the notice label and unset it after a delay if it is the verified address label; this supports the auto-dismiss behavior in the designs.
  • In the view:
    • We use the view model's notice label to display the notice, if the label is set.
    • We only show the destination address in the "Ship to" section if there are address lines to display.

Testing information

Prerequisite: WooCommerce Shipping is installed, activated, and set up on your store.

With a destination address:

  1. Create or open an order with at least one physical product and the processing status, and a shipping address.
  2. Tap "Create Shipping Label" in order details.
  3. Confirm the "unverified address" notice appears in the collapsed bottom sheet.
  4. Open the bottom sheet and confirm the "unverified address" label appears below the destination address.

Without a destination address:

  1. Create or open an order with at least one physical product and the processing status, and no shipping address.
  2. Tap "Create Shipping Label" in order details.
  3. Confirm the "missing address" notice appears in the collapsed bottom sheet.
  4. Open the bottom sheet and confirm the "missing address" label appears in place of the destination address.

A purchased shipping label

  1. Open an order with a purchased shipping label.
  2. Tap "Create Shipping Label" in order details.
  3. Confirm no notice appears in the collapsed bottom sheet.
  4. Open the bottom sheet and confirm the "verified address" label appears below the destination address.

Screenshots

Missing Unverified Existing label (verified)
Simulator Screenshot - iPhone 16 Pro - 2025-02-06 at 12 19 23 Simulator Screenshot - iPhone 16 Pro - 2025-02-06 at 12 19 35 Simulator Screenshot - iPhone 16 Pro - 2025-02-06 at 12 20 13
Simulator Screenshot - iPhone 16 Pro - 2025-02-06 at 12 19 26 Simulator Screenshot - iPhone 16 Pro - 2025-02-06 at 12 19 37 Simulator Screenshot - iPhone 16 Pro - 2025-02-06 at 12 20 15

Although we don't have the logic for it yet, I simulated how the verified address notice will auto-dismiss after it is shown:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-06.at.11.22.51.mp4

  • I have considered if this change warrants user-facing release notes and have added them to 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:

  • 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 all devices (phone/tablet) and no regressions are added.

@rachelmcr rachelmcr added the feature: shipping labels Related to creating, ordering, or printing shipping labels. label Feb 6, 2025
@rachelmcr rachelmcr added this to the 21.7 milestone Feb 6, 2025
@rachelmcr rachelmcr requested a review from toupper February 6, 2025 12:51
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 21.7. 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

@wpmobilebot
Copy link
Collaborator

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 Numberpr15081-3d2970b
Version21.6
Bundle IDcom.automattic.alpha.woocommerce
Commit3d2970b
App Center BuildWooCommerce - Prototype Builds #12842
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

Copy link
Contributor

@toupper toupper left a comment

Choose a reason for hiding this comment

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

LGTM and tests well! 🚢 :shipit:

@rachelmcr rachelmcr merged commit f774bf9 into trunk Feb 7, 2025
20 of 21 checks passed
@rachelmcr rachelmcr deleted the issue/13783-missing-destination-address branch February 7, 2025 12:52
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants