-
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 2024-06-28] [$250] mWeb - Chat - Uploading an image while offline briefly shows an offline message in the preview #42657
Comments
Triggered auto assignment to @anmurali ( |
We think that this bug might be related to #vip-vsb |
@anmurali FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors. |
ProposalPlease re-state the problem that we are trying to solve in this issue.mWeb - Chat - Uploading an image while offline briefly shows an offline message in the preview What is the root cause of that problem?We use App/src/components/ImageView/index.tsx Line 217 in fd322cc
App/src/components/ImageView/index.tsx Line 251 in fd322cc
What changes do you think we should make in order to solve the problem?We can check if the attachment is a local file or not and only show const isLocalFile = url.startsWith('blob:') || url.startsWith('file:'); We might also want to do the same in other components which uses What alternative solutions did you explore? (Optional) |
@anmurali Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Job added to Upwork: https://www.upwork.com/jobs/~017a93bd4c637b4a77 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.While offline, when we add an local file attachment, the What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?This App/src/components/AttachmentOfflineIndicator.tsx Lines 33 to 35 in cb692c5
+ const isLocalFile = uri.startsWith('blob:') || uri.startsWith('file:');
+ if (isLocalFile || !isOffline || onCacheDelay) {
- if (!isOffline || onCacheDelay) { We have 5 different components who use this Alternatively,We can use the What alternative solutions did you explore? (Optional)And easier solution could be to just change the rendering conditionals in ImageView component That is,
Using this 2nd solution will only fix this issue for |
ProposalPlease re-state the problem that we are trying to solve in this issue.Uploading an image while offline briefly shows an offline message in the preview What is the root cause of that problem?These 2 lines are the UX of showing offline indicator/loading indicator for images: App/src/components/ImageView/index.tsx Lines 216 to 217 in fd322cc
We can see that:
When the image is not loaded, the user should see either the In
If the image doesn't finish loading within that timeframe, and So in case it's a large image, or the device's resources are limited (in case of Android Chrome), 200ms is not enough for the cached/local image to show, then we'll see offline indicator for some time before the image shows. What changes do you think we should make in order to solve the problem?First, add a method to check if a file URI is a local file which will use same logic as in
It's important to check the
While the image is loading and it's a local file, we should:
Then update this to
Update this to
We need to fix the same for other places that use The logic can be moved into What alternative solutions did you explore? (Optional)An improvement is during the time of |
Proposals from @Krishna2323 (here) as well as @dominictb (here) fixes the bug (mentioned in the GH issue) Chronologically:
But @dominictb also found out one more bug in the same flow that we do not show the The extra bug reported by @dominictb is: Video of online and offline bug
In
I have tried to be fair to both the contributors as the reported bug was something extra and not part of original GH issue, but i leave the final decision to the 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@arosiclair , an additional bug was found by a contributor, i have created a detailed summary of the issue here, please assign accordingly, thanks 🥂 |
Thanks for the kind feedback @allgandalf ! To further clarify, my proposal is the only one that does this for checking local file
Also, regarding the App/src/components/ImageView/index.tsx Lines 216 to 217 in fd322cc
We can see that the condition for If we change the condition of I'd be curious to hear what @arosiclair thinks! |
Even if we don't consider that an additional bug, it would have been easily caught in the PR phase. There is no additional effort in making it work since it just uses the same variable. In my opinion, that shouldn't be considered a point for selecting a proposal, as most of the time there are minor issues in the selected proposal that are caught and fixed during the PR. This one is also an easy fix and would have definitely been caught while recording the video. |
@dominictb @Krishna2323 i have put up a pretty detailed summary here, so let’s refrain from commenting further, so let’s wait for the internal engineers decision 🙏 |
@Krishna2323 I would disagree, it's only rather noticeable when you try to upload a large video. The bug here itself is straight forward to fix so it's important to make sure we don't leave any regression/bugs behind. A "sure" is better than a "maybe it will be fixed in the PR, maybe not". As far as I can see, proposals with regressions/bugs left behind shouldn't be considered "complete proposal" and selected. It took me a good amount of time to figure it out so I don't agree it's easy either (it would've been easy for me too if I've seen it in someone else's proposal 😄 ). Let's wait for @arosiclair to decide 🙏 |
Nope, it can be easily seen while uploading an image. You can see it here. Also, this is component for images, it won't be displayed for videos.
I don't think it would have taken more than a minute of few for me because,
And similarly, we need to also modify the Rather, it would have been very easy for you to find a solution since I already had the fix for the original issue, and the same approach is also applied to the loader.
You can't call it a regression, it would have been only found after applying the fix. it isn't visible in the issue screenshots section nor it is mentioned anywhere. |
@arosiclair Sorry for the back-and-forth here, here's the C+ comment for your review! |
Thanks for the breakdown @allgandalf
This doesn't really seem like much of a bug to me just a very minor quirk. Let's ignore this. @Krishna2323's proposal looks pretty straight forward so let's go with that. |
@allgandalf, PR ready for review. |
@arosiclair The reason for not selecting my proposal is that the loading bug in the flow I fixed is minor and will be ignored. However, it's being fixed in the PR using the changes I suggested. According to @allgandalf
Could you help double check if the decision here is fair when we select one proposal but uses another proposal in the PR? I wouldn't insist to assign me as the PR is in progress, but I think splitting bounty would be more fair if we're to fix the additional bug that is only addressed in my proposal Thanks |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.0-9 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 2024-06-28. 🎊 For reference, here are some details about the assignees on this 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:
|
@anmurali, bump for payments :) |
@arosiclair What's your thought on this? @mallenexpensify curious for your thought too on how you think we should handle this case. Thanks |
@dominictb Krishna posted a better proposal earlier than yours. Your proposal included a fix for another bug which I deemed not important. This is why I hired Krishna. Whether or not the bug you reported ends up getting fixed here or anywhere is not important. You do not "own" that bug and we never posted a job to fix it. I'd appreciate it if you would let this go. The repeated back in forth in these comments is not really doing you any favors and this energy would be better spent on another proposal instead. Thank you 🙏 |
@arosiclair, @anmurali, @Krishna2323, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@arosiclair, @anmurali, @Krishna2323, @allgandalf Eep! 4 days overdue now. Issues have feelings too... |
Can you issue payments for this please @anmurali :) |
@arosiclair, @anmurali, @Krishna2323, @allgandalf 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
@Krishna2323 has been paid but @allgandalf still needs to complete the BZ checklist before payment is due. |
Regression Test Proposal
Verify offline message is not shown Do we agree 👍 or 👎 |
@allgandalf - paid! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.76.1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4575560
Issue reported by: Applause - Internal Team
Action Performed:
Precondition: Go offline
Expected Result:
The image preview should be displayed even when uploading an attachment while offline.
Actual Result:
Uploading an image while offline briefly shows an offline message in the preview
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6493126_1716829499362.Screenrecorder-2024-05-27-21-18-51-168.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @anmuraliThe text was updated successfully, but these errors were encountered: