-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Improve eReceipt visually in New Dot #55803
base: main
Are you sure you want to change the base?
Conversation
@shawnborton @ishpaul777 One of you needs to 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] |
It seems like the spacing is quite off from our mockups. Here is what I see in your videos: Yet here is our Figma file: Can you update and then we can review again from there? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@mkzie2 can you please provide steps to add a card transaction (maybe we need to mock it? if yes please provide code to execute to have the mocked transaction) Thank you! |
Aside from @shawnborton's comments, why does the receipt change colors between the preview and full receipt? I would assume it would stay the same between those views. |
No problem, this is because I hard-coded it to display the receipt. |
@shawnborton, I updated it to match the Figma. Please help to check again. ![]() |
@ishpaul777 Updated the test step. |
dont we want make distance e-receipt to follow similar design @Expensify/design @mkzie2 |
I think we should leave the map receipts alone for now. We can follow up later and change them a bit to match these new eReceipts, but I say we tackle eReceipts first so that we don't have too much scope creep in this particular issue. |
🚧 @shawnborton has triggered a test hybrid app build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Hmm that's an improvement but it's still not technically working exactly as I was showing above. It's not truly scaling at it's exact proportions depending on the outer container width. What can we do about that? Also, on the reports page, most of the eReceipts are yellow and don't have an icon: CleanShot.2025-02-26.at.15.07.29.mp4What's going on there? Because then when I open up the receipt, it shows the icon and it's even a different color. |
Currently, if the width is larger than 335, I only expand the background and the receipt body and the scale is 1. Otherwise, it's scaled based on the outer width.
@shawnborton Can you export the Onyx state and give me here so it's easy to debug this one. Thanks. |
Can you get it working exactly like I am showing in my video above? We want to make sure that no matter where we place the eReceipt, it's going to scale perfectly to it's outer parent container. Let me know if that makes sense. |
@shawnborton I need to confirm, what it looks like if the outer parent container width is> 335px? I saw in the video above that the width starts at 335px. On the large screen, the max width of the receipt preview in MoneyRequestView is
Let me investigate. |
@mkzie2 Whats the latest here? Any updates |
@ishpaul777 I updated with the |
For per-diem are we generating an image from html? Does the data change the process? I'm not familiar with this flow. If it's a similar process we can likely duplicate it for eReceipts. |
I looked into it, we can potentially do what we do for per-diem or travel receipts and generate html receipts from the BE. Is this what you had in mind @shawnborton? I can't say it's worth the BE work to add if it's just for the report previews though. WDYT? |
I don't know that it needs to be generated by the backend... I mostly just want to make sure that we can use consistent scaling of the eReceipt the same way we would scale a flat png receipt image. Does that make sense? However we want to accomplish that doesn't matter to me too much. |
Hm even if can create Receipt Image on Backend we need placeholder for receipt until it is the Backend process, currently perdiem receipt use the existing Erecipt component, I suggest we stick with frontend unless it's not feasible to maintain the component, I have good feeling about the scaling of receipt logic @mkzie2 pushed with last commits (still need to test it properly) |
Okay, going to run another test build then and see how it feels. |
🚧 @shawnborton has triggered a test app build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪 |
Great catches Shawn—agree with all your feedback. This one is a beast. |
This has come up a few times now @mkzie2 can you please add explaination whats the problem and fix this at root |
@shawnborton For this problem, I got a fix here, please check my video. Screen.Recording.2025-03-08.at.16.37.44.mp4
Fixed now. Screen.Recording.2025-03-08.at.16.57.11.mov
Can you get this to happen and export the Onyx data for me, it's helpful for me to debug what is the current problem with the real data. |
Explanation of Change
Improve eReceipt visually in New Dot
Fixed Issues
$ #55083
PROPOSAL: #55083 (comment)
Tests
_
with the transactionID that we're viewing)or add this
useEffect
toMoneyRequestView
Offline tests
Same
QA Steps
or add this
useEffect
toMoneyRequestView
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Screen.Recording.2025-02-03.at.16.17.38.mov
Android: mWeb Chrome
Screen.Recording.2025-02-03.at.15.08.30.mov
iOS: Native
Screen.Recording.2025-02-03.at.16.23.20.mov
iOS: mWeb Safari
Screen.Recording.2025-02-03.at.15.10.11.mov
MacOS: Chrome / Safari
Screen.Recording.2025-02-03.at.15.04.40.mov
MacOS: Desktop
Screen.Recording.2025-02-03.at.16.26.39.mov