[!Important]
Reviewers: if there is some fix that is critical and that must be done before Friday 11h00 I will do my best to make necessary changes in time, but as I have already gone way over my time budget for Swent this week I will make the majority of the changes in part 2 of the feature.
Foreword
This Pull request was planned to bring a complete image crop feature when merged, but things didn't go exactly as I wanted. I tried 3 libraries for image editing, and only one worked: Compose-Cropper. Although being exactly what I was searching for, it turned out to be the most poorly documented library I've ever seen. Anyway, after countless hours of trial and error, I have finally managed to offer a crop feature that can be demonstrated for the sprint review.
New features
This pull request implements a simple yet efficient way to crop profile pictures. The screen will open after the picture selection. The controls to crop are really simple and smooth, which makes the experience pleasant
Known issues (by severity)
(High) Going to the crop screen discards changes in the textfields of ProfileEdit. Possible solution: implement a viewmodel for profile edition (and move most image related logic there)
(High) Using the back button while cropping leaves the original picture as selected image ready for upload. Possible solution: store the intermediary image elsewhere.
(High) Very low coverage. Solution: tests will be added next week.
(Low) I can't manage to have the square + round outline when cropping AND a square image as a result.
[!Note]
I could have done some hotfix for this PR, but the result will be much cleaner after the refactor of the viewmodels.
Plans for part 2/2
Refactor the very encumbered ProfilesViewmodel and move some logic in a ProfileEditViewmodel
Crop Image (1/2)
Foreword
This Pull request was planned to bring a complete image crop feature when merged, but things didn't go exactly as I wanted. I tried 3 libraries for image editing, and only one worked: Compose-Cropper. Although being exactly what I was searching for, it turned out to be the most poorly documented library I've ever seen. Anyway, after countless hours of trial and error, I have finally managed to offer a crop feature that can be demonstrated for the sprint review.
New features
This pull request implements a simple yet efficient way to crop profile pictures. The screen will open after the picture selection. The controls to crop are really simple and smooth, which makes the experience pleasant
Known issues (by severity)
Plans for part 2/2