-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Animate the paid checkmark when paying expense #49438
Animate the paid checkmark when paying expense #49438
Conversation
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeios.movAndroid: mWeb Chromeandroid-web.moviOS: Nativeios.moviOS: mWeb Safariios-web.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@bernhardoj |
Done |
I also noticed that we have animation for the header preview on example |
Done. It's quite different though because looks like on the GIF, there are 2 preview messages, 1 fades out, 1 fades in, while in the component, we reuse 1 text only. a.mp4 |
We need to fix eslint one more time 😅 |
Everything is good now |
The only thing I would do Anyway LGTM ! |
height.value = withDelay( | ||
totalDelay, | ||
withTiming(0, {duration: CONST.ANIMATION_PAY_BUTTON_DURATION}, () => runOnJS(onAnimationFinish)()), | ||
withTiming(0, {duration: CONST.ANIMATION_PAID_DURATION}, () => runOnJS(onAnimationFinish)()), |
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.
Small thing I'm noticing is that we're just using withTiming
, but we could use withSpring
and/or withBounce
to give these animations a more natural feel.
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.
we talked in slack about using bounce for showing the checkmark
The recording in the original post looks pretty good. Would be cool to delay the checkmark animation about 300ms to ensure it catches the attention a bit more. |
@roryabraham @dubielzyk-expensify Checkmark Delay 300ms + (Fade replaced with) Bounce (using withSpring) web.mp4Shorter bounce duration (200ms) web.mp4 |
Lovely! I am digging the shorter duration version more I think. |
Same! I am loving the |
Great, pushed the update |
Looks nice and works well ! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.0.40-0 🚀
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.40-6 🚀
|
@@ -151,6 +132,18 @@ function ReportPreview({ | |||
const {totalDisplaySpend, reimbursableSpend} = ReportUtils.getMoneyRequestSpendBreakdown(iouReport); | |||
|
|||
const iouSettled = ReportUtils.isSettled(iouReportID) || action?.childStatusNum === CONST.REPORT.STATUS_NUM.REIMBURSED; | |||
const previewMessageOpacity = useSharedValue(1); | |||
const previewMessageStyle = useAnimatedStyle(() => ({ |
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.
bug: preview does not display checkmark - #50219
for details, see - #50554 (comment).
Details
We want to also animate the checkmark when paying expense.
Fixed Issues
$ #48036
PROPOSAL: #48036 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4