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

Address selection #13235

Merged
merged 3 commits into from
Jan 4, 2025
Merged

Address selection #13235

merged 3 commits into from
Jan 4, 2025

Conversation

atorresveiga
Copy link
Contributor

@atorresveiga atorresveiga commented Jan 2, 2025

Part of: #12439

Description

This PR updates the ship from selection control to use a bottom sheet dialog. The changes focus only on UI changes and minor adjustments to prepare the view model to save the bottom sheets' state. A different PR will tackle full support for keeping the bottom sheets' state.

Testing information

Prerequisites

  • Need a store with more than one origin address

TC1

  1. Open the orders section
  2. Open an order eligible for shipping label creation
  3. Tap on create shipping label
  4. Expand the shipment details section
  5. Tap on the more(3 dots) icon next to the selected ship from address
  6. Check that the address selection bottom sheets expand with all the origin addresses
  7. Check that the select ship from address feature works as expected

TC2

  1. Run TC1 on landscape

TC3

  1. After adding a package, we display the purchase button at the bottom of the screen. TC3 should be to select a package and run from steps 5-7 of TC1 and check that the UI works as expected.
  • The state is not yet handled in the view model. I will work on this in the next PR. My plan is to handle the bottom sheets state in the view model and to connect the back gesture with hiding the bottoms sheets.

The tests that have been performed

  • Check that the UI works as expected

Images/gif

Screen_recording_20250102_182922.mp4
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

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 big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@atorresveiga atorresveiga added type: task An internally driven task. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Jan 2, 2025
@atorresveiga atorresveiga requested a review from ThomazFB January 2, 2025 21:32
@atorresveiga atorresveiga added this to the 21.4 milestone Jan 2, 2025
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 2, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit52521c7
Direct Downloadwoocommerce-wear-prototype-build-pr13235-52521c7.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 2, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit52521c7
Direct Downloadwoocommerce-prototype-build-pr13235-52521c7.apk

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 8.44156% with 141 lines in your changes missing coverage. Please review.

Project coverage is 40.62%. Comparing base (bcbbde1) to head (52521c7).
Report is 60 commits behind head on trunk.

Files with missing lines Patch % Lines
...orders/wooshippinglabels/address/AddressSection.kt 0.00% 95 Missing ⚠️
...oid/ui/orders/wooshippinglabels/ShipmentDetails.kt 0.00% 37 Missing ⚠️
...hippinglabels/WooShippingLabelCreationViewModel.kt 72.22% 5 Missing ⚠️
...rs/wooshippinglabels/rates/ui/ShippingRatesCard.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13235      +/-   ##
============================================
- Coverage     40.64%   40.62%   -0.03%     
+ Complexity     6387     6386       -1     
============================================
  Files          1351     1351              
  Lines         77444    77500      +56     
  Branches      10650    10655       +5     
============================================
+ Hits          31479    31486       +7     
- Misses        43186    43234      +48     
- Partials       2779     2780       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomazFB ThomazFB self-assigned this Jan 2, 2025
Copy link
Contributor

@ThomazFB ThomazFB left a comment

Choose a reason for hiding this comment

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

Great UI work, @atorresveiga! Looks good :shipit:

@atorresveiga atorresveiga merged commit 34be219 into trunk Jan 4, 2025
15 checks passed
@atorresveiga atorresveiga deleted the issue/12439-address-selection branch January 4, 2025 15:49
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: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants