Skip to content

[Shipping labels] Disable "Select all" for fulfilled shipments #15614

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

Merged
merged 2 commits into from
May 12, 2025

Conversation

RafaelKayumov
Copy link
Contributor

@RafaelKayumov RafaelKayumov commented May 9, 2025

Description

Makes the "Select all" navigation bar item disabled for a fulfilled shipment. More in discussion: p1745586909868109-slack-C03L1NF1EA3

Testing steps

  • Log in to a test store with Woo Shipping plugin set up.
  • Navigate to the Orders tab and select a completed order with at lest one shipment with a purchased label and at least one shipment without a label.
  • Select the fulfilled shipment.
  • Make sure the top left "Select all" option is disabled.
  • Switch to unfulfilled shipment and make sure the "Select all" get enabled.
  • Switch between shipments and make sure the "Select all" has corresponding valid enabled/disabled state.

Screenshots

Before After
Снимок экрана 2025-05-09 в 15 52 30 Снимок экрана 2025-05-09 в 15 44 23

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

@RafaelKayumov RafaelKayumov added this to the 22.4 milestone May 9, 2025
@RafaelKayumov RafaelKayumov added type: bug A confirmed bug. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels May 9, 2025
@RafaelKayumov RafaelKayumov changed the title Disable "Select all" for fulfilled shipments [Shipping labels] Disable "Select all" for fulfilled shipments May 9, 2025
@RafaelKayumov RafaelKayumov requested a review from itsmeichigo May 9, 2025 13:02
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 9, 2025

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 Number29781
VersionPR #15614
Bundle IDcom.automattic.alpha.woocommerce
Commit799804d
Installation URL5pr8bif195q38
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo self-assigned this May 12, 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.

Thanks for the fix - it works as described. I left a comment regarding the condition check.

Comment on lines 64 to 66
.disabled(viewModel.isSavingShipmentInfo)
.disabled(
viewModel.currentShipment.isPurchased
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we keep both conditions? If yes, combining them in a separate property enablesSelectAll in the view model would make it clearer.

@RafaelKayumov RafaelKayumov force-pushed the conditionally-disable-select-all-items branch from e215763 to 799804d Compare May 12, 2025 10:09
@RafaelKayumov RafaelKayumov merged commit a5fe606 into trunk May 12, 2025
13 checks passed
@RafaelKayumov RafaelKayumov deleted the conditionally-disable-select-all-items branch May 12, 2025 10:31
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. type: bug A confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants