-
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
Changed Profile Picture save on click of Save button #7366
Changed Profile Picture save on click of Save button #7366
Conversation
@rushatgabhane @AndrewGable I have got one question. From the UX standpoint, if you see the toast message shows while the image is being uploaded at the background. Because we stay at the same page I don't think so it needs any handling. But do let me know if you want to move |
Proposal hasn't been given a green yet, so I'll wait until that's done before PR review. |
Ohh sorry for the confusion, I took this assignment comment as for hire #7015 (comment) do you want me to close the PR ? |
That's okay. Umm, convert it to a draft I guess |
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.
Overall looks good, minor change suggested.
I'm fine with the growl shown while the image is uploading. Because in case of a large image/slow network, it'll be confusing to see the success message long after exiting ProfilePage.
@mananjadhav The save button isn't disabled after uploading new avatar. 1.New.Expensify.-.Google.Chrome.2022-01-24.15-55-54.mp4 |
@rushatgabhane I tried updating the state of Screen.Recording.2022-01-25.at.11.06.22.PM.mov |
Hmm, that's not ideal. We should fix the flicker. |
@mananjadhav please merge main into this branch |
@rushatgabhane Sorry for the delay, been unwell. I will resolve the conflict when working on the flicker change. I have thought about the flicker but I have a few questions. It should disable only if the image is successfully uploaded right? With this if I consider then on Now either I can use a flag/condition, which probably updates on profile image upload complete, say or I store a state variable like and use that to disable the button. Thoughts? |
Hi @mananjadhav, that's okay. I hope you're well now :)
I don't think that's a good idea. If the button isn't disabled, the user might press it again. |
I'll get back to you regarding flicker. |
…ofile-image-call # Conflicts: # src/pages/settings/Profile/ProfilePage.js
@rushatgabhane I guess I didn't elaborate on all cases. I've updated the code of what I was explaining and it seems to be working. Thoughts? |
Thanks for the update @mananjadhav, the save button isn't disabled until upload is complete. Screencast.from.30-01-22.05-24-20.PM.+03.mp4I can't find a way around the flicker without waiting for the upload either. Sorry to drag this, but let's revert and go to the previous implementation? |
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.
@mananjadhav I found a bug.
- Remove profile photo.
- Click Save button.
- Change timezone.
Expected result: Save button is enabled, and has styling of enabled button (100% opacity).
Actual result: Save button is enabled, but it has styling of disabled button (50% opacity).
Screen.Recording.2022-01-31.at.5.14.30.AM.mov
@rushatgabhane I had specifically tested this piece and I am not able to reproduce it. Can you help with the reproduction steps? Here's the video while I did the testing. profile-image-update-test.mp4 |
@mananjadhav hmm, this is interesting. You're following the correct steps. I retested and I'm facing this issue on all platforms :( |
I didn't check on a different device, but I tested it all on platforms. I did all my testing on Chrome earlier but I saw your screencast is in Safari, so I tested on Safari as well. |
@mananjadhav thanks! @AndrewGable could you please help us verify this? Because it isn't reproducible for Manan. |
@mananjadhav This is weird, but for me the Growl message is shown twice. I know this isn't the case for you as seen in the video above. I clicked only once, branch is on latest commit with nothing to commit, tested on all platforms and 2 laptops. I think there's something wrong on my end that I can't figure out, let's see what @AndrewGable says :) Screen.Recording.2022-01-31.at.9.37.36.AM.mov |
@AndrewGable Can you help me and @rushatgabhane with this one? |
@mananjadhav I just tested it on a third device. I can consistently repro this bug and Growl message shown twice. Let's revert to - #7366 (comment) |
Hmm, 🤔 Let me probably try this again. |
Any updates? Thanks |
@rushatgabhane Thanks for being persistent with this. I was able to reproduce this and just pushed a fix for this. |
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.
@AndrewGable LGTM! 🎉️ Tests well on all platforms and all bugs are resolved.
Thanks so much @mananjadhav for making the changes.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @AndrewGable in version: 1.1.38-0 🚀
|
🚀 Deployed to production by @Julesssss in version: 1.1.38-3 🚀
|
Looks like this caused a regression @mananjadhav @AndrewGable - #7784 |
On it |
// Recalculate logins if loginList has changed | ||
if (this.props.user.loginList === prevProps.user.loginList) { | ||
if (this.props.user.loginList !== prevProps.user.loginList) { |
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.
Can this ever be false? I'm pretty sure in JS you can never check if arrays (objects) are equal with ===
or !==
because they're pointers
Details
Fixed Issues
$ #7015
Tests
QA Steps
Tested On
Screenshots
Web
web-profile-picture-update.mov
Mobile Web
mweb-profile-image-update_cAd3mnGv.mp4
Desktop
desktop-profile-image-update_RIANWcN4.mp4
iOS
ios-profile-image-update.mp4
Android
android-profile-image-update_c9u6RQul.mp4