-
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
[$500] Profile - View Profile photo after Uploading new photo shows attachment preview without name for a breif moment #29647
Comments
Triggered auto assignment to @anmurali ( |
Job added to Upwork: https://www.upwork.com/jobs/~0123f3f4476583bca2 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - View Profile photo after Uploading new photo shows attachment preview without name for a breif moment What is the root cause of that problem?We're showing the paperClip icon here if the file is not the image App/src/components/Attachments/AttachmentView/index.js Lines 132 to 133 in 0e64161
we just set the file when the App/src/components/AttachmentModal.js Lines 130 to 136 in 0e64161
After uploading the new image, we're updating the originalFileName and avatar App/src/libs/actions/PersonalDetails.js Lines 422 to 424 in 0e64161
but because the -> When the modal is open file is undefined -> paperClip is shown for a brief moment Note: Why does this issue happen at the first time users change the avatar? When users delete the avatar, we don't clear the originalFileName -> file is always the image App/src/libs/actions/PersonalDetails.js Lines 480 to 484 in 0e64161
What changes do you think we should make in order to solve the problem?we should update the file when the originalFileName get changed in
We also need to clear originalFileName here ResultScreen.Recording.2023-10-16.at.12.19.37.mov |
@tienifr I added a ![]() |
@fedirjh Is this the first time you change the avatar? Or can you remove the avatar and logout then login again |
I removed the personal details and, synced personal details then changed the avatar. I was not able to replicate the bug after the first time avatar change. So this #29647 (comment) was when the bug occurred . |
@fedirjh The isImage function just check the extension of the source. As you can see the source above doesn't have any extensions -> it returns false |
@tienifr Ok, so we require |
@tienifr This is a regression from #22145, So the server does not return
@tienifr Is it possible to remove |
@fedirjh I am afraid that without filename we can not detect the uploaded file is image or pdf,... |
Don't we validate images inside the profile picker? @tienifr I get this error when I try to upload a pdf ![]() |
@fedirjh I mean the temporary file is a blob and it can be the image or pdf so we need the file name to detect. We already mentioned that in App/src/components/Attachments/AttachmentView/index.js Lines 129 to 133 in e213f7e
and App/src/components/Attachments/AttachmentView/index.js Lines 104 to 105 in e213f7e
|
@tienifr Have you tried to upload a PDF to a profile pic? that's not possible for me and got an error, We have validation to prevent sending invalid files for profile pic unless I am missing something ?
It's possible to send pdf files inside the report so we need that validation there. One solution is that we hardcode the |
@fedirjh I think we can't remove The file is updated only in Currently |
I understand your point; the code becomes less and less readable.
We can proceed with it, but it appears to be a patch on top of a poorly implemented solution, which will make the code less readable and less maintainable.
Yes, I agree with that. I think the best solution is to remove |
cc @anmurali Let's close this issue : #28036 (comment) |
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.3.84-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @ishpaul777
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697307312806139
Action Performed:
Expected Result:
If photo is loading Attachment modal shows loading indicator without showing attachment preview
Actual Result:
View Profile photo after Uploading new photo shows attachment preview without name for a breif moment
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Screen.Recording.2023-10-16.at.4.16.21.AM.mov
Android: mWeb Chrome
Screen.Recording.2023-10-16.at.4.22.06.AM.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-10-16.at.04.17.37.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-10-16.at.04.19.23.mp4
MacOS: Chrome / Safari
Screen.Recording.2023-10-14.at.11.44.49.PM.mov
Profile.-.View.Profile.photo.after.Uploading.new.photo.shows.attachment.mp4
MacOS: Desktop
Screen.Recording.2023-10-14.at.11.42.31.PM.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: