Closed euanmillar closed 2 years ago
@jpye-finch Any suggestions on where to put the error messages?
@Zangetsu101 errors such as failed to upload?
@jpye-finch image type not supported or image size exceeded.
bug:
Default avatar do not appear immediately when there is no internet connection. It appears after clicking any tab
Zoomed image is uploaded and do not have option to decease size of what is uploaded
Showing apply button and not disabled for invalid image. Should be saved button (disabled)
Profile icon is updated after refresh in settings page
Sometimes default avatar shows for some users in team tab even when there is internet connection
"Profile image successfully updated" toast keeps on appearing in Settings page. This bug is only found in farajaland-staging . This is not occuring in farajaland-qa
Concern: there is no option to delete an image
@SyedaAfrida
this is tested. waiting for review though it's passed. @anny320
completed
AS a user I WANT to be able to change my profile icon SO THAT i can personalise my account.
Description Allows a user to update their profile image
Mobile has a small window to drag and place image
Users can increase the size and drag to position.
Minimum size is the width of the circle. They can't drag beyond. Or resize beyond.
Design https://www.figma.com/file/YsucvwEW6lGAOiW9jUp7Cyiw/7.-Settings?node-id=229%3A4111
Copy https://www.notion.so/opencrvs/10-Profile-image-ed5faaf30d6944f88a2fde29f80fa73b
Acceptance criteria GIVEN I am on the settings page WHEN I click on the profile image THEN show the file browser with file types restricted to jpg or png.
GIVEN I have chosen an image, if the file size is less than 5MB THEN show the modal to crop and resize the image
Clicking Change image should re-open the file browser
The crop and resize feature can be built using a React OpenSource library if you wish, however it should be a recent and well supported library with high number of contributors and preferably TypeScript - but we can discuss. The below user experience is preferred but not necessarily essential.
The crop and resize feature can be built entirely in client > components, not packages > components
Dragging
GIVEN my image has been uploaded WHEN I drag on the image THEN move the image in the desired location
GIVEN I am dragging an image WHEN i drag the image to the edge of the circle THEN stop the image from being dragged any further
Resizing
GIVEN I am sliding the resize bar WHEN I am incresing/decreasing the size of my image THEN increase and decrease the size of the image
GIVEN I am sliding the resize bar WHEN I am decreasing the size to the width of the circle THEN stop the image from being decreased any further
Set profile image
GIVEN I have positioned my image WHEN I click change THEN close the modal and set their profile image
When the user clicks "Apply", show the loading animation
If the user has no internet connection, the Apply button must be disabled.
Default avatar already exists, but if the user has internet connectivity, then replace the default with an avatar using user initials from UI Avatars API