-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
feat: 3656 - privacy compliance for cropped new images #3673
feat: 3656 - privacy compliance for cropped new images #3673
Conversation
Impacted files: * `background_task_image.dart`: now we crop here the image before sending it * `new_crop_page.dart`: now we either let the server crop (old image) or let the background task crop (brand new image) * `rotated_crop_controller.dart`: refactored adding a static method `getCroppedBitmap`
Codecov Report
@@ Coverage Diff @@
## develop #3673 +/- ##
==========================================
- Coverage 9.45% 9.42% -0.03%
==========================================
Files 269 269
Lines 13576 13611 +35
==========================================
Hits 1283 1283
- Misses 12293 12328 +35
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…new images Impacted files: * `image_crop_page.dart`: minor refactoring * `new_crop_page.dart`: minor refactoring * `product_image_viewer.dart`: minor refactoring * `uploaded_image_gallery.dart`: bug fix - we should consider that it's a new image
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 great, thanks @monsieurtanuki
try { | ||
File(_getCroppedPath()).deleteSync(); | ||
} catch (e) { | ||
// possible, but let's not spoil the task for that either. |
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.
Could we still log this, in case something happens (same a few lines above)
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.
@M123-dev For this particular case (_getCroppedPath()
) that wouldn't be such a good idea as sometimes - when the crop is actually the "full image" - we don't create this path/File. We would then have to handle a special flag for that.
Regarding the other cases, I wouldn't say it would be completely pointless, but almost: if it fails the rest of the app will work OK, including the next uploads.
And there's already an open issue regarding background task init+garbage collecting, that would get rid of those files anyway.
One day we may log this, but today that looks like a "just in case" that we don't really need.
Anyway sentry is overcrowded with camera issues that make it useless.
Thank you @M123-dev for the review! |
Impacted files:
background_task_image.dart
: now we crop here the image before sending itnew_crop_page.dart
: now we either let the server crop (old image) or let the background task crop (brand new image)rotated_crop_controller.dart
: refactored adding a static methodgetCroppedBitmap
What
Fixes bug(s)