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] Integrate shipping service section in main Woo Shipping label creation screen #14229

Merged

Conversation

rachelmcr
Copy link
Contributor

Part of: #14143

Description

This adds the "Shipping service" section to the main screen in the Woo Shipping label creation flow. After a package is selected during label creation:

  • The shipping service section is displayed.
  • The purchase button is displayed (disabled) when the bottom sheet is collapsed.

How

  • Adds a temporary hasPackage property to WooShippingCreateLabelsViewModel. This can be used while the package flow under development to enable the shipping service section. (Once complete, the shipping service section will be visible after a package is selected.)
  • Adds WooShippingServiceView to WooShippingCreateLabelsView, visible when hasPackage is true.
  • Adds the purchase button to the collapsed bottom sheet, displayed when hasPackage is true.
  • Updates the shipping rate properties in WooShippingServiceViewModel to be @Published. This ensures the main screen is redrawn when the selected shipping rate changes.

Testing information

  1. Make sure the feature flag revampedShippingLabelCreation is enabled.
  2. Set hasPackage to true in WooShippingCreateLabelsViewModel here.
  3. Build and run the app.
  4. Create an order with the processing status and at least one physical product.
  5. In the order details, select "Create Shipping Label."
  6. Confirm the "Shipping service" section appears on the main label creation screen.
  7. Confirm you can switch tabs, sort, and select the shipping rates and signature options.
  8. Confirm the (disabled) purchase button appears at the bottom of the collapsed bottom sheet.
  9. Open the bottom sheet and confirm the (disabled) purchase button still appears there as before.

Screenshots

Shipping service Selecting rates Bottom sheet
Simulator Screenshot - iPhone 15 Pro - 2024-10-28 at 14 37 16 Simulator Screenshot - iPhone 15 Pro - 2024-10-28 at 14 37 25 Simulator Screenshot - iPhone 15 Pro - 2024-10-28 at 14 37 31

  • 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 Oct 28, 2024
@rachelmcr rachelmcr added this to the 21.0 milestone Oct 28, 2024
@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 Numberpr14229-3b56d3d
Version20.9
Bundle IDcom.automattic.alpha.woocommerce
Commit3b56d3d
App Center BuildWooCommerce - Prototype Builds #11315
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@rachelmcr rachelmcr merged commit 4585084 into trunk Oct 28, 2024
18 of 19 checks passed
@rachelmcr rachelmcr deleted the issue/14143-integrate-shipping-service-in-main-screen branch October 28, 2024 15:05
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