-
Notifications
You must be signed in to change notification settings - Fork 132
[Payment Method Improvements] AppBar and Navigation for ChangeDueCalculatorFragment #11532
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
[Payment Method Improvements] AppBar and Navigation for ChangeDueCalculatorFragment #11532
Conversation
@kidinov this is targeted at 18.7 but can go into 18.8 if I don't merge in time. |
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. |
...in/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorFragment.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorFragment.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorFragment.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorFragment.kt
Outdated
Show resolved
Hide resolved
...tlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModelTest.kt
Outdated
Show resolved
Hide resolved
...tlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModelTest.kt
Outdated
Show resolved
Hide resolved
...tlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorViewModelTest.kt
Outdated
Show resolved
Hide resolved
...in/kotlin/com/woocommerce/android/ui/payments/methodselection/ChangeDueCalculatorFragment.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overal lgtm! I left a few suggestions, please take a look
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. |
…ge-due-calculator-ui-for-cash-payments
Thanks @kidinov This should be ready for review again now that I've pushed those changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I noticed 2 small things though:
- Too make passing
orderId
mandatory and have compile time validation you can declare argument as part of the arguments for the fragment:
<fragment
android:id="@+id/changeDueCalculatorFragment"
android:name="com.woocommerce.android.ui.payments.methodselection.ChangeDueCalculatorFragment"
android:label="ChangeDueCalculatorFragment" >
<argument
android:name="orderId"
app:argType="long" />
</fragment>
And then in the VM you can get the object with
private val navArgs: ChangeDueCalculatorFragmentArgs by savedStateHandle.navArgs()
navArgs.orderId
And also I noticed that you placed these calses into methodselection
package which probably not the most appropriate place for that. I'd go with payments/changeduecalculator
Feel free to address that in the following PRs
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
OTHER_PAYMENT_METHODS
FFRELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.