-
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
[HOLD for payment 2023-05-05] [$2000] Uploading gif image seems to fluctuate the image while previewing it immediately after uploading #16528
Comments
Triggered auto assignment to @stephanieelliott ( |
Bug0 Triage Checklist (Main S/O)
|
Feels questionable whether we should allow uploading an animated gif as a profile pic. |
video-2023-03-27_16.54.41.mp4@marcaaron It happens with normal images too. Can you please try to view any profile picture of the user. It seems to fluctuate with normal images too, not only with gifs. |
Hm, I'm not seeing that behavior occur on static images, like .jpg. For me, it's only happening with .gifs. Agree with @marcaaron that we probably shouldn't support .gifs in that field, posted in Slack to discuss: https://expensify.slack.com/archives/C01SKUP7QR0/p1680106537787609 |
OK it sounds like we had previously agreed to allow a GIF and convert it to JPG (context). So I suppose this does need to be fixed. |
Job added to Upwork: https://www.upwork.com/jobs/~01afe7983a04d30b23 |
Current assignee @stephanieelliott is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
Triggered auto assignment to @danieldoglas ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.The image fluctuates while trying to preview the image What is the root cause of that problem?The issue is in this line where we're setting the width and height of the When the images finish loading, the image shows as full size (100%) while the image is very small (less than the full size), so it immediately resizes to its actual small size, causing the flicker. What changes do you think we should make in order to solve the problem?We should not set width and height of the image container if the image is still loading. This can be done by Line 93 in 3c41171
We can pass the loading state in by using the Please note we're already trying to do the same here App/src/components/ImageView/index.js Line 235 in 6bfc8bb
Image component, but it doesn't work well in this case since the Image and its container renders in different times so there is race condition. That logic should be applied to the container of the image instead, as suggested above. We can safely remove this check for web if the container check above is applied (however that check in case of mWeb here should still be kept since there's no Pressable container on mWeb).
What alternative solutions did you explore? (Optional)NA |
@tienifr don't know if you saw this comment, but the expectation here is to convert the GIF to a JPG. I don't think your proposal is doing that. |
@danieldoglas yes I saw that commend, this is an existing feature on staging, the Avatar upload is already doing this for uploaded GIFs. Also just to clarify the issue occurs even for regular png/jpg images (not just GIFs), the key here is to use an image with width and height smaller than that of the desktop web container width and height, you can try with an image of just 100px by 100px. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Small Image flicker on web and desktop when opened via attachment modal, this is applicable for gif or regular image. What is the root cause of that problem?Within App/src/components/ImageView/index.js Line 277 in 4ee21e9
This Lines 201 to 207 in 4ee21e9
When component load at that time What changes do you think we should make in order to solve the problem?Within if (imgWidth === 0 || imgHeight === 0) {
return {
//height: isZoomed ? '250%' : '100%', // Old Code
height: isZoomed ? '250%' : undefined, // Updated Code
//width: isZoomed ? '250%' : '100%', // Old Code
width: isZoomed ? '250%' : undefined, // Updated Code
};
} What alternative solutions did you explore? (Optional)Just return undefined object as shown below: if (imgWidth === 0 || imgHeight === 0) {
return undefined;
} ResultFlicker-Solved.mp4 |
Reviewing proposals above tomorrow |
I like @tienifr's proposal,
I've managed to reproduce this (it's easier if you have a slow connection):
@tienifr, are you able to reproduce this? |
@eVoloshchak thanks for the explanation on the reproduction steps, I can reproduce it now, here's my proposal for that issue (it's a very different issue with different root cause) ProposalPlease re-state the problem that we are trying to solve in this issue.Sometimes an empty attachment gets displayed when uploading a large avatar in a slow network connection, and then view the avatar immediately in the chat detail page. What is the root cause of that problem?The root cause is here App/src/components/AttachmentView.js Line 84 in 64f4a78
When we upload the image and view it immediately, the image URL is a blob So the component is unable to check that the source passed in is an image, thus it displays the paper clip icon as a fallback. What changes do you think we should make in order to solve the problem?There're certain scenarios where we know exactly that the Line 122 in 6ccfc4b
We can just pass an And update the condition here App/src/components/AttachmentView.js Line 84 in 64f4a78
isImage is true, it will render an image, otherwise it will depend on the checking of the source and file as usual
What alternative solutions did you explore? (Optional)
|
@danieldoglas @eVoloshchak @stephanieelliott this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
📣 @tienifr You have been assigned to this job by @danieldoglas! |
@danieldoglas @eVoloshchak This PR: #17454 is ready for review. Thanks |
PR is under review! |
Upwork job price has been updated to $2000 |
Manually increasing the bounty since we found another bug while testing that will be fixed together in this PR. |
PR is on staging |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.7-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-05-05. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@eVoloshchak can you please fill the checklist above? @stephanieelliott I think this is ready for payment |
|
Getting ready to pay (just waiting on offer acceptance in Upwork) - looks like the job was assigned on 4/13, all reviewed and all changes resolved on 4/18. Then on 4/18 another bug surfaced, we discussed and eventually decided to fix it in the same PR on 4/21. PR was finally merged on 4/16. For the purposes of calculating the speed bonus/penalty, I am going to use the date that comments were resolved on the original bug (4/18) as the "merge date". 4/13 assignment vs 4/18 merge = 5 days, so this one is not eligible for the speed bonus nor will it face a penalty, so the payment will be $2,000. |
@stephanieelliott hi, I think there're 2 days of weekends between 4/13 and 4/18, kindly consider that in the calculations as well. |
Oh, thanks @tienifr I hadn't thought about that -- thanks for calling that out! Everyone is paid out, C and C+ w/ bonus |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
The image shouldn’t fluctuate while trying to preview the image
Actual Result:
The image fluctuates while trying to preview the image
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.89-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Recording.62.mp4
photoerror-2023-03-26_14.16.52.mp4
photoerror-2023-03-26_14.09.59.mp4
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation:
https://expensify.slack.com/archives/C049HHMV9SM/p1679819714964549
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: