Skip to content

Conversation

@selanthiraiyan
Copy link
Contributor

@selanthiraiyan selanthiraiyan commented Mar 25, 2025

Closes: #15306

Description

Add a notice to move items between shipments when items are selected. Moved the instructions notice into a subview to be able to show the notices in a VStack (one below another).

Changes

  • New MoveToShipmentNotice view with options to move to new shipment or existing shipments.
  • Make the instructions notice into a subview of the split shipments detail screen.
  • Initial logic to show or hide notices based on selection.

Steps to reproduce

  1. Log in to a test store with the Woo Shipping plugin set up.
  2. Create an order with multiple products and different quantities for each product.
  3. Enter a valid shipping address for the order.
  4. Open the order detail page.
  5. Tap "Create shipping label".
  6. Tap "Split shipments".
  7. Validate that you see a notice with instructions to select items to split into shipments. Design - bsLNrhmi2xQZB4C0TzjmHB-fi-942_42236
  8. Select items, and you should see another notice-like view that shows the count of selected items.
  9. Tapping on "Move to" should show a "Menu" with options to move to existing or new shipments. These values are currently hardcoded and will be updated in a future PR.

Testing information

  • Validated that instructions and selection notices are displayed as expected.

Screenshots

Video recording

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-03-25.at.18.55.50.mp4

Screenshots

Light Dark
Simulator Screenshot - iPhone 16 Pro - 2025-03-25 at 18 57 49 Simulator Screenshot - iPhone 16 Pro - 2025-03-25 at 18 57 42

  • 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.

@selanthiraiyan selanthiraiyan added the feature: shipping labels Related to creating, ordering, or printing shipping labels. label Mar 25, 2025
@selanthiraiyan selanthiraiyan added this to the 22.1 milestone Mar 25, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Mar 25, 2025

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 Numberpr15418-e0f41f4
Version22.0
Bundle IDcom.automattic.alpha.woocommerce
Commite0f41f4
App Center BuildWooCommerce - Prototype Builds #13406
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@selanthiraiyan selanthiraiyan marked this pull request as ready for review March 25, 2025 13:35
@itsmeichigo itsmeichigo self-assigned this Mar 26, 2025
Copy link
Contributor

@itsmeichigo itsmeichigo left a comment

Choose a reason for hiding this comment

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

The layout looks good to me! I left some comments regarding the choice of structures, but please feel free to merge and I can handle the changes as part of handling the moving of items.

Text(viewModel.itemsDetailLabel)
.foregroundStyle(Color(.textSubtle))
}
ZStack(alignment: .bottom) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should use a VStack instead, because otherwise the notice would cover the scroll view when it's long enough:

let viewModel: MoveToShipmentNoticeViewModel

var body: some View {
HStack {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an adaptive stack instead to ensure the contents are readable when the font size is really large on a narrow device.

@itsmeichigo
Copy link
Contributor

Actually I'll merge the PR now to unblock the work for #15307. Thank you!

@itsmeichigo itsmeichigo merged commit b69e8ae into trunk Mar 26, 2025
14 checks passed
@itsmeichigo itsmeichigo deleted the task/15306-select-item branch March 26, 2025 03:35
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.

[Split shipment] Selecting a shippable item

4 participants