Feat: Implement to use a 👍icon next to approved report preview#50387
Feat: Implement to use a 👍icon next to approved report preview#50387youssef-lr merged 13 commits intoExpensify:mainfrom
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
situchan
left a comment
There was a problem hiding this comment.
Please add platform screenshots
| })); | ||
|
|
||
| const isApproved = ReportUtils.isReportApproved(iouReport, action); | ||
| const thumbsUpScale = useSharedValue(isApproved ? 1 : 0.25); |
There was a problem hiding this comment.
0.25 - where does this value come from? what issue with 0?
There was a problem hiding this comment.
If we use 0, it will look less subtle than this . #49847 (comment)
|
@situchan, can you please check this comment? |
|
@Expensify/design, please check if the animation of the thumbs-up icon looks correct or not. Monosnap.screencast.2024-10-02.05-53-34.mp4 |
|
@Expensify/design, friendly bump ^ |
|
@Expensify/design ^ |
|
That looks good to me. Keen to hear the others thoughts. I do see a slight jump when the Red Dot disappears though which I think we should probably fix 🤔 |
|
Agree about the RBR not going away immediately. It is weird to see the thumbs up icon before the RBR goes away. We also might want to consider making that top eyebrow line use a height of 20px so we don't get a small jump from 20px down to 16px height once the RBR goes away. |
|
@Krishna2323 what is status? |
|
Will work on these issues today. |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@situchan, I have increased the line-height of the text beside RBR so it won't jump when the RBR is removed. As for the RBR not being removed immediately, I believe that's a separate issue from what we are trying to solve, and I don't have time to investigate it in-depth. I have very limited time these days as I’ve been dealing with health issues for the past 2-3 months. Sorry :( |
|
Agree "RBR not being removed immediately" is out of scope.
👍 |
|
@Krishna2323 please also add test: pay after approve. Just to see how 👍 animates out and ✅ animates in |
|
Let us know when there are updated videos/screenshots to review as well! |
@situchan, done. |
|
@situchan bump. |
|
#50387 (comment) |
@shawnborton, do you also need the animation from 👍 to ✅ for all platforms? Below is the video on web and on other platforms I have only recorded the animation of the appearance of 👍. Monosnap.screencast.2024-10-02.05-53-34.mp4Android: Nativeandroid_native.mp4Android: mWeb Chromeandroid_chrome.mp4iOS: Nativeios_native.mp4iOS: mWeb Safariios_safari.mp4MacOS: Chrome / Safariweb_chrome.mp4MacOS: Desktopdesktop_app.mp4 |
|
I think it's looking really good. Will let Shawn and @dubielzyk-expensify weigh in too! |
|
Yep that looks good to me too 👏 |
|
Generally looks good to me, but I think I was expecting the same button animation to happen where the button transforms into some kind of "Approved" text... I know a Payment button needs to show up next, so I think we could just fade that Payment button in after a second or so of showing the Approved text. Thoughts on trying something like that out? |
|
@DylanDylann you can start reviewing 😃 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-11-09.at.15.19.30.movAndroid: mWeb ChromeScreen.Recording.2024-11-09.at.15.17.44.moviOS: NativeScreen.Recording.2024-11-09.at.15.18.34.moviOS: mWeb SafariScreen.Recording.2024-11-09.at.15.15.36.movMacOS: Chrome / SafariScreen.Recording.2024-11-09.at.15.08.09.movMacOS: DesktopScreen.Recording.2024-11-09.at.15.14.09.mov |
|
@Krishna2323 Could you please resolve conflict? |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
conflicts resolved |
|
@Krishna2323 Bump again |
|
@youssef-lr Could you help to review this PR? |
|
conflicts resolved |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
| const onlyShowPayElsewhere = useMemo(() => !canIOUBePaid && getCanIOUBePaid(true), [canIOUBePaid, getCanIOUBePaid]); | ||
| const shouldShowPayButton = isPaidAnimationRunning || canIOUBePaid || onlyShowPayElsewhere; | ||
| const shouldShowApproveButton = useMemo(() => IOU.canApproveIOU(iouReport, policy), [iouReport, policy]); | ||
| const shouldShowApproveButton = useMemo(() => IOU.canApproveIOU(iouReport, policy), [iouReport, policy]) || isApprovedAnimationRunning; |
There was a problem hiding this comment.
why do we need this || isApprovedAnimationRunning;?
There was a problem hiding this comment.
If we don't add || isApprovedAnimationRunning, the button will be hidden as soon as we approve the expense, and IOU.canApproveIOU(iouReport, policy) becomes false, interrupting the animation.
|
✋ 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/youssef-lr in version: 9.0.65-0 🚀
|
|
@Krishna2323 this has been reverted due to causing #52873. Tried debbuging this ad hoc and removed the following line:
but that did not help - it seems this isn't the root cause. |
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.65-5 🚀
|
|
@mjasikowski @DylanDylann, I tried reproducing the regression bug on a physical device, but I wasn't able to reproduce it. WhatsApp.Video.2024-12-02.at.16.25.37.mp4 |
|
@DylanDylann, could you please test the new PR on a physical Android device to double-check that this issue is no longer reproducible? |
|
@Krishna2323 I'll try to reproduce this today |
|
@Krishna2323 I can still reproduce the issue on the original PR branch (Pixel 4a), will try with the new PR in a moment: Screen.Recording.2024-12-04.at.15.52.36.mov |
|
Can't reproduce in your new PR: #53373 |
|
@mjasikowski thanks for checking 🙏🏻 |
Details
Fixed Issues
$ #49847
PROPOSAL: #49847 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4