-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Receipt thumbnail should show the top of the receipt #35041
Conversation
@dukenv0307 I can see that you're actively working on this! What's the current status of the PR? I think it would be great to prioritize this highly. @dragnoir Thanks for volunteering to test this PR, but it's not needed or welcome. We'll ensure to test all image ratios. |
@cubuspl42 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] |
@cubuspl42 The PR is ready for review. Have a question here, should we always set |
Are you discussing something that affects user-observable behavior? If so, could you share screenshots of both options? |
|
It's a good question. I believe we should stop testing with moon images and figure out what might be the actual user stories here. Let's consider this horizontal picture of a recipe (4:3): Also 16:9: We shouldn't focus on anything wider. It's already focusing on corner cases. (it's digitally edited, I didn't have a horizontal recipe image handy) |
The linter is still complaining |
@cubuspl42 sorry about that. I was just wondering about the aspect ratio when there's no parent width/height specified. You're doing great with your work, and I'm keeping an eye on it to learn different ways to tackle this. |
@dukenv0307 Ouch; conflicts |
@cubuspl42 I tested and it only happens for scan requests with very long vertical images. The scan split doesn't happen that. |
Okey, I'll re-test it with normal ratios! Real users will likely only upload photos from the camera, uncropped. |
This is not what I observe. As I observe it, it appears that the backend returns a square thumbnail even when I upload a standard, 4:3 vertical image. Image I used: Thumbnail I got from the backend: Images aligned on top of each other: This is just basic, centered cropping. |
@Beamanator Would it be easy to adjust the backend, so it chooses the top portion of the image when generating the receipt thumbnail? I'm also wondering if it's easy/possible to distinguish between the receipts and other images, and whether we're fine with aligning to the top of all user-uploaded images 🤔 |
@Beamanator Please check this comment #35041 (comment) when you have a chance. |
Yikes i'm very sorry for the delay gents, I plan to get back to this ASAP this weekend or early next week - appologies! |
@Beamanator Thanks! Just as a reminder of the current state of this issue/PR: We're implementing a feature originally discussed on Slack (it was called "bug", but this never worked "as expected", as far as I understand) to position the receipt thumbnails so the top of the image is presented, not the center. We were holding on another issue for quite some time. Currently, we are (mostly?) done with the frontend part of the task, but it seems that the backend behavior also needs some changes, as the thumbnail image comes pre-cropped to the frontend. |
Ok I do have a theory on this one, it looks like a few months back (early feb) we merged this PR - https://github.com/Expensify/Web-PDFs/pull/560/files - which had the intent to fix #32649 We mayyyy have added an unnecessary I'll bring this ^ convo to the issue & pull in someone else |
@cubuspl42 will you please retest so we can hopefully get this merged today? 🙏 |
I have trouble testing this right now, the scan requests... disappear for me. Some backend hiccups? |
That definitely doesn't sound good @cubuspl42 ! Is it reproducible? Can you report a bug if it is? |
I'm sorry for a lag, I'll retest this today. |
I had really weird issues when testing this, but I believe that they were on the backend and unrelated to this PR. Things look good now, no jump after the refresh! receipt-retest-1-web-converted.mp4 |
Thanks for retesting everything @cubuspl42 ! Do you mind doing 1 more quick retest since @dukenv0307 just merged main? (since it had been a while) 🙏 |
@Beamanator I always merge |
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
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
This PR is failing because of issue(#34120) The issue is reproducible in: All environments RPReplay_Final1713805433.MP42024-04-22.19.57.30.movtop.of.the.receipt.mp41713802231792.A_Receipt_thumbnail_should_show_the_top_of_the_receipt.mp41713802231792.mWeb_Receipt_thumbnail_should_show_the_top_of_the_receipt.mp4 |
These are two different kinds of previews; in the videos, we can see that the ones we worked on (report action previews) do align to the top: I recall that we discussed this other kind of previews at some point, but I can't find it now. Do you have some more input here? Also, could you check if covering this second kind of previews is challenging technically? Does it also need backend changes? |
@cubuspl42 Do we mention that it doesn't work on cc @Beamanator |
I think that that's what we're talking about. I think the users, mentally, don't consider various previews (submit expense previews vs. report action previews) to be really different, and they intuitively expect consistency. Yes, please create a follow-up! |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.64-6 🚀
|
Details
Fixed Issues
$ #34120
PROPOSAL: #34120 (comment)
Tests
Offline tests
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
Screen.Recording.2024-01-30.at.14.56.56.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov