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 UI to display address verification status and save button #14848

Open
wants to merge 9 commits into
base: issue/13781-edit-address-view-model
Choose a base branch
from

Conversation

rachelmcr
Copy link
Contributor

@rachelmcr rachelmcr commented Jan 10, 2025

Part of: #13781
⚠️ Depends on #14847 ⚠️

Description

This adds the bottom section of the edit address screen in the Woo Shipping label flow. There are three possible states for the UI:

  • If the address is verified and unchanged, it shows "Address verified" in green with a "Close" button to dismiss the sheet.
  • If the address is unverified (e.g. it has been edited) and is not missing any information, it shows "Unverified address" in red with a "Validate & Save" button.
  • If the address is missing required information, it shows "Missing information" in red with a disable "Add Missing Information" button.

The status is based on a status property in the view model. For now, this is set depending on whether the address is already verified. Future PRs will add more logic to set the status based on whether the address has changed and local validation.

Testing information

  1. Ensure the latest production version of WooCommerce Shipping (Version 1.3.2) is installed, activated, and set up on your store.
  2. Create or open an order with at least one physical product and the processing status.
  3. Tap "Create Shipping Label" in order details.
  4. Open the "Shipment details" bottom sheet.
  5. Tap the "Ship from" origin address.
  6. Tap the edit (pencil) icon on one of the origin addresses.
  7. In the edit address sheet, confirm a status label and button appears at the bottom of the form.
  8. Confirm you can scroll down to view all of the form fields.

Screenshots

Verified Unverified Missing information
Screenshot 2025-01-10 at 16 05 59 Screenshot 2025-01-10 at 16 06 13 Screenshot 2025-01-10 at 16 32 05

  • 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 Jan 10, 2025
@rachelmcr rachelmcr added this to the 21.5 milestone Jan 10, 2025
@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 Numberpr14848-c1b170a
Version21.3
Bundle IDcom.automattic.alpha.woocommerce
Commitc1b170a
App Center BuildWooCommerce - Prototype Builds #12480
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

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.

2 participants