woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

Creating shipping label: Landscape support #12837

Closed atorresveiga closed 3 weeks ago

atorresveiga commented 3 weeks ago

Closes: #12281

Description

This PR adjusts the UI for landscape mode. To achieve that, I created a new file for the Address and Purchase section and included a Landscape version of the controls. I used the LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE to check the phone orientation and created the VerticalDivider composable to add a vertical divider on some of the rows.

Design

Testing information

  1. Create an Order with the processing status on a store that can create shipping labels
  2. Tap on Orders
  3. Tap on the order created on step 1
  4. Tap con create shipping labels
  5. Check that Shipment details card is displayed at the bottom of the screen
  6. Tap on/Drag up Shipment details
  7. Check that the bottom sheets expands and the shipment detail content is visible
  8. Turn the phone (landscape)
  9. Check that the landscape mode matches the design

The tests that have been performed

  1. Test that the UI interaction works as expected

Images/gif

https://github.com/user-attachments/assets/09fb19c0-9de0-4079-b319-348503cbfaa8

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:

dangermattic commented 3 weeks ago
1 Warning
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

wpmobilebot commented 3 weeks ago
📲 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
Commitc95901474aec54fa922bce803310f28363ba9c5f
Direct Downloadwoocommerce-wear-prototype-build-pr12837-c959014.apk
wpmobilebot commented 3 weeks ago

📲 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
Commitc95901474aec54fa922bce803310f28363ba9c5f
Direct Downloadwoocommerce-prototype-build-pr12837-c959014.apk
codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 311 lines in your changes missing coverage. Please review.

Project coverage is 40.38%. Comparing base (01623fe) to head (c959014). Report is 5 commits behind head on trunk.

Files with missing lines Patch % Lines
...roid/ui/orders/wooshippinglabels/AddressSection.kt 0.00% 166 Missing :warning:
...oid/ui/orders/wooshippinglabels/PurchaseSection.kt 0.00% 78 Missing :warning:
...oid/ui/orders/wooshippinglabels/ShipmentDetails.kt 0.00% 67 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #12837 +/- ## ============================================ - Coverage 40.49% 40.38% -0.12% Complexity 5773 5773 ============================================ Files 1241 1243 +2 Lines 70522 70716 +194 Branches 9833 9877 +44 ============================================ Hits 28558 28558 - Misses 39332 39526 +194 Partials 2632 2632 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.