Skip to content
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

Extract edit-user-name widget, add avatar updating to it #99

Closed
blazern opened this issue Jan 10, 2022 · 0 comments
Closed

Extract edit-user-name widget, add avatar updating to it #99

blazern opened this issue Jan 10, 2022 · 0 comments
Assignees
Labels
5sp 5+ story points
Projects

Comments

@blazern
Copy link
Contributor

blazern commented Jan 10, 2022

Extract edit-user-name widget into a EditUserDataWidget, just like langs editing is extracted into UserLangsWidget.
Just like UserLangsWidget, EditUserDataWidget should not send data to the backend itself. It should be only the representative of data added to it, accept callbacks and/or controllers (like TextField does).

When the avatar in EditUserDataWidget is clicked, the app should initiate photo selection process. The primary goal of such selection is to let user select a photo from their phone's gallery, not to take a new picture.

Once the photo is taken, ImageCropPage should immediately be opened. ImageCropPage must force the cropped area to be a square, user should see it's a square.

Once the photo is cropped, it should be downsized (if too big) according to the size figured out in plante-app-team/plante_server#5.

Once the photo is downsized, it should be set as the selected image of EditUserDataWidget.

Maybe it makes sense to create a AvatarSelectionHelper, which would: initiate photo selection, cropping, then would downsize the image.

When user clicks "Done" on the page after the avatar is chosen, the avatar is sent to the backend. The Backend class should support that.

Avatar selection is optional, not mandatory. This should be explicitly mentioned in the UI.

@blazern blazern created this issue from a note in Profile (To do) Jan 10, 2022
@blazern blazern added the 5sp 5+ story points label Jan 10, 2022
@blazern blazern self-assigned this Jan 10, 2022
@blazern blazern added this to the Profile, part 1 milestone Jan 16, 2022
@blazern blazern moved this from To do to In progress in Profile Jan 17, 2022
blazern added a commit to blazern/plante that referenced this issue Jan 18, 2022
@blazern blazern closed this as completed Jan 22, 2022
Profile automation moved this from In progress to Done Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5sp 5+ story points
Projects
No open projects
Development

No branches or pull requests

1 participant