Closed joshwingreene closed 2 years ago
@joshwingreene Generally we want to keep concerns about how to display content to css. This makes components more flexible and usable in different situations and properly separates concerns (css is particularly concerned with display).
Changes
UserProfileImg
so that we can get the raw image element for the profile image, instead of having to work with the circular and box-shadow'ed version only.LoadingSpinner
so that the inline styling was removed.UpdateProfilePictureForm
and the associated test since #646 made them unnecessary.Purpose
Improves the UX of the profile photo upload flow
Approach
The approach mimics how Twitter allows users to change their profile photo. Instead of making the user first select the photo and then click on an 'Update' button to upload it, those two steps have been consolidated into one step. The user just needs to click on the camera icon inside of the profile photo in the header and then they will need to choose a new profile photo to upload via the normal file upload dialog. Once done, their profile photo will be uploaded and updated on the frontend.
Testing Steps
Screenshots
https://user-images.githubusercontent.com/2876874/195207041-7524035e-7f29-4cd0-805d-4a6343bae8c7.mov