You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Web - Attachment - Attached long image can be briefly opened in full resolution #47646
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
@greg-schroeder 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
Please re-state the problem that we are trying to solve in this issue.
We can preview the high res image in its full size.
What is the root cause of that problem?
When we first trying to upload the hi-res image, the image preview modal will only show the image icon, file name, and a message that preview is disabled when uploading hi-res image.
After we send the image and open the image preview, this time, isUploaded is true. Before the image is uploaded to the BE, isHighResolution is always false because the file resolution here somehow 0.
So, the image is shown at its full resolution. Only after the image is uploaded to the BE, the BE returns the preview source that contains a smaller resolution of the file.
What changes do you think we should make in order to solve the problem?
We can disable previewing the image before it gets uploaded to the BE. To do that, we need to add data-expensify-preview-modal-disabled="true" to the optimistic img tag,
changed the title [-]Web - Attachment - Attached long image can be briefly opened in full resolution[/-][+][$250] Web - Attachment - Attached long image can be briefly opened in full resolution[/+]on Aug 21, 2024
Whoa, I think we took the solution much too far for this edge-case issue by disabling all local/offline image previews we spent years building in #44889.
I know we tagged design in here on this big decision, but I feel pretty strongly that we should revert this and go back to the drawing board on solutions.
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Activity
melvin-bot commentedon Aug 19, 2024
Triggered auto assignment to @greg-schroeder (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.IuliiaHerets commentedon Aug 19, 2024
We think that this bug might be related to #vip-vsb
IuliiaHerets commentedon Aug 19, 2024
@greg-schroeder 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
bernhardoj commentedon Aug 20, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
We can preview the high res image in its full size.
What is the root cause of that problem?
When we first trying to upload the hi-res image, the image preview modal will only show the image icon, file name, and a message that preview is disabled when uploading hi-res image.
App/src/components/Attachments/AttachmentView/index.tsx
Lines 232 to 249 in d519981
After we send the image and open the image preview, this time,
isUploadedis true. Before the image is uploaded to the BE,isHighResolutionis always false because the file resolution here somehow 0.App/src/components/Attachments/AttachmentView/index.tsx
Lines 126 to 127 in d519981
But we won't focus on that issue because even if
isHighResolutionis true, the preview source of the local image is the original source of the image.App/src/components/Attachments/AttachmentView/index.tsx
Line 249 in d519981
So, the image is shown at its full resolution. Only after the image is uploaded to the BE, the BE returns the preview source that contains a smaller resolution of the file.
What changes do you think we should make in order to solve the problem?
We can disable previewing the image before it gets uploaded to the BE. To do that, we need to add
data-expensify-preview-modal-disabled="true"to the optimistic img tag,App/src/libs/ReportUtils.ts
Lines 4038 to 4040 in de9cb1f
which will disable the preview.
App/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.tsx
Line 62 in de9cb1f
[-]Web - Attachment - Attached long image can be briefly opened in full resolution[/-][+][$250] Web - Attachment - Attached long image can be briefly opened in full resolution[/+]melvin-bot commentedon Aug 21, 2024
Job added to Upwork: https://www.upwork.com/jobs/~013a2a8877c3c4d06c
melvin-bot commentedon Aug 21, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (
External)16 remaining items
bernhardoj commentedon Aug 29, 2024
PR is ready
cc: @Ollyws
roryabraham commentedon Sep 2, 2024
Whoa, I think we took the solution much too far for this edge-case issue by disabling all local/offline image previews we spent years building in #44889.
I know we tagged design in here on this big decision, but I feel pretty strongly that we should revert this and go back to the drawing board on solutions.
Brought this up with the team in slack here
greg-schroeder commentedon Sep 9, 2024
Pending discussion above
greg-schroeder commentedon Sep 17, 2024
@roryabraham can you help summarize where that discussion landed? I admit I'm a bit unfamiliar with this specific space in the product
Ollyws commentedon Sep 17, 2024
The PR was reverted in the end, I think we can pay out and close this one.
greg-schroeder commentedon Sep 19, 2024
Ah, word, yeah I see that now
greg-schroeder commentedon Sep 19, 2024
Payment summary:
Contributor: @bernhardoj - $250 - You can make a manual request via ND
C+: @Ollyws - $250 - You can make a manual request via ND
This was reverted, but not because of a bug or anything like that - we just decided not to go this route after saying we wanted to originally.
bernhardoj commentedon Sep 19, 2024
Requested in ND.
JmillsExpensify commentedon Sep 19, 2024
$250 approved for @bernhardoj
Ollyws commentedon Sep 19, 2024
Requested in ND.
Ollyws commentedon Sep 21, 2024
Seemed that request failed, requested again in ND.
garrettmknight commentedon Sep 24, 2024
$250 approved for @Ollyws