woocommerce / woocommerce-android

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

[Payment Method Improvements] AppBar and Navigation for ChangeDueCalculatorFragment #11532

Closed backwardstruck closed 1 week ago

backwardstruck commented 2 weeks ago

Addresses: #11525

Description

UI improvements for ChangeDueCalculatorFragment to provide a consistent title bar. This is the first PR for the GH issue, which contains other tasks.

Testing instructions

  1. Enable OTHER_PAYMENT_METHODS FF
  2. Navigate to the cash payment screen
  3. Check AppBar Title:
    • Ensure the title is centered and displays dynamic content in various states (e.g., during loading and on displaying success state).
  4. Back Button Functionality:
    • Click the back button and verify it navigates to the prior screen correctly across different app states.
  5. Rotation Consistency:
    • Ensure that the AppBar works in phone and tablet mode
backwardstruck commented 2 weeks ago

@kidinov this is targeted at 18.7 but can go into 18.8 if I don't merge in time.

wpmobilebot commented 2 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
FlavorJalapeno
Build TypeDebug
Commit46e0e7c10cfee242f74a58ea04c95bb239f28a1f
Direct Downloadwoocommerce-prototype-build-pr11532-46e0e7c.apk
codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 85.71429% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 40.47%. Comparing base (663f191) to head (46e0e7c). Report is 16 commits behind head on trunk.

Files Patch % Lines
...ts/methodselection/ChangeDueCalculatorViewModel.kt 85.71% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #11532 +/- ## ============================================ + Coverage 40.44% 40.47% +0.02% - Complexity 5197 5201 +4 ============================================ Files 1083 1083 Lines 63001 63006 +5 Branches 8635 8635 ============================================ + Hits 25481 25500 +19 + Misses 35226 35210 -16 - Partials 2294 2296 +2 ```

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

soundsokay commented 2 weeks ago

If closing the test coverage gap noted by the Codecov Report for ChangeDueCalculatorFragment isn't planned to be addressed in this PR and isn't already covered by a ticket or task please file one as a reminder to get back to this later.

backwardstruck commented 2 weeks ago

If closing the test coverage gap noted by the Codecov Report for ChangeDueCalculatorFragment isn't planned to be addressed in this PR and isn't already covered by a ticket or task please file one as a reminder to get back to this later.

Yes, I will address those in this ticket as there's more functionality to be added that will also require tests.

backwardstruck commented 1 week ago

Overal lgtm! I left a few suggestions, please take a look

Thanks @kidinov This should be ready for review again now that I've pushed those changes.

backwardstruck commented 1 week ago

Thanks @kidinov those are very good suggestions. Indeed, I forgot to move the classes to changeduecalculator. I will address these in my next PR. They are listed in this new GH issue:

https://github.com/woocommerce/woocommerce-android/issues/11553