-
Notifications
You must be signed in to change notification settings - Fork 137
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
[POS][Custom payment UI] – Payment processing animation with Lottie #13100
base: custom-payment-ui-6-use-payment-controller-in-pos
Are you sure you want to change the base?
[POS][Custom payment UI] – Payment processing animation with Lottie #13100
Conversation
Generated by 🚫 Danger |
Project dependencies changesThe following changes in project dependencies were detected (configuration list
tree+\--- com.airbnb.android:lottie-compose:5.2.0
+ +--- com.airbnb.android:lottie:5.2.0
+ | +--- androidx.appcompat:appcompat:1.3.1 -> 1.6.1 (*)
+ | \--- com.squareup.okio:okio:1.17.4 -> 3.7.0 (*)
+ +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
+ +--- androidx.compose.foundation:foundation:1.1.1 -> 1.6.5 (*)
+ \--- androidx.compose.ui:ui:1.1.1 -> 1.6.5 (*) |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 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 @@
## custom-payment-ui-6-use-payment-controller-in-pos #13100 +/- ##
====================================================================================
Coverage 40.26% 40.26%
- Complexity 6081 6082 +1
====================================================================================
Files 1273 1273
Lines 73987 73988 +1
Branches 10123 10124 +1
====================================================================================
+ Hits 29792 29794 +2
- Misses 41611 41612 +1
+ Partials 2584 2582 -2 ☔ View full report in Codecov by Sentry. |
* given order draft created and reader connected, when payment is processed, should show processing state * given order draft created and reader connected, when payment is captured, should show processing state
@@ -260,6 +256,8 @@ class WooPosTotalsViewModel @Inject constructor( | |||
childrenToParentEventSender.sendToParent(ChildToParentEvent.PaymentFailed) | |||
} | |||
|
|||
CardReaderPaymentState.ReFetchingOrder -> Unit |
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.
💡 ReFetchingOrder
state is emitted after PaymentSuccess
state on which we show Payment success screen. ReFetchingOrder
indicates the order is synced in DB. We want to ignore it in POS.
LottieAnimation( | ||
modifier = Modifier.size(256.dp), | ||
composition = tapCardAnimation, | ||
clipSpec = LottieClipSpec.Markers("reader_awaiting_start", "reader_awaiting_end"), |
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.
💡 Marker names refer to makers[] table from woopos_card_ilustration.json
file and point to animation frames we loop animation between.
Animated payment states with Lottie
trunk
Closes: #13068
Closes: #12826
Description
This PR adds animations for payment states:
See the video below.
Decision on introducing Lottie: p1733860533372109-slack-C070SJRA8DP
Steps to reproduce
Testing information
Design specs: TfaZ4LUkEwEGrxfnEFzvJj-fi-2710_118241
Animation specs: p6riRB-aNq-p2
The tests that have been performed
I tested the payment collection in POS and tried tuning up the animation to match specs as much as possible in reasonable time constraints.
Images/gif
Screen_recording_20241211_154058.mp4
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: