-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Issue #896 Perceived failure to save profile pic #911
base: master
Are you sure you want to change the base?
Conversation
…, improved typing declarations in some files
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.
Looks pretty good to me, and I've done a test of cropping where the save button is disabled while the crop window is open.
I did run into an issue I'd like to know if you can replicate. Here's the steps:
- log in, go to user profile, edit profile image
- click upload new image, select any image but do not crop
- click the modal's Cancel button (not "cancel" for the image crop, but the "close this entire modal" cancel at the bottom)
- click the edit profile image icon again to re-open this cropping modal
rather than showing my my existing profile image as I'd expect. This blank modal persists until I refresh the page. I can't replicate this on prod-mirror or staging but I can replicate it in my dev environment. Any idea what's going on there?
Thanks, when I follow those steps this is happening in my developer environment as well. I'm not sure of the cause but I will look into it! |
Haven't had a chance to verify this, but I suspect it is related to the state variable |
@PeterBreen I believe I have solved this. The value of the state variable |
Sorry, I think I was unclear in my reference to prod-mirror and staging; I meant to say (but failed entirely) that it seemed to be an issue introduced with this PR Either way I pulled the latest version of this branch, ran my list of steps and can't reproduce the error, so I think you got it fixed too. Nice, thank you! |
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.
The only issue I had was resolved; looks good!
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.
Changing project thumbnails fails with the following console error:
ImageCropUploadButton.jsx:123 Uncaught TypeError: this.props._onIsCroppingChanged is not a function at ImageCropUploadButton._handleFileSelection (ImageCropUploadButton.jsx:123:16) at FileReader.<anonymous> (FileSelectButton.jsx:71:18)
To disable the "Save" button until the user clicks "Done Cropping", I lifted the state variable "isCropping" up from ImageCropUploadButton to EditUserThumbnailModal, and added an _onIsCroppingChanged handler function to EditUserThumbnailModal. This appears to work as expected with no console errors unwanted side effects.
Note that VSCode complains about the type declarations and function binding in many of the .jsx files. I improved this in a few of the files I touched, but addressing this further feels like a separate issue.