-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
fix: #1538 - new crop tool (cf. dev mode) #2872
fix: #1538 - new crop tool (cf. dev mode) #2872
Conversation
New files: * `crop_grid.dart`: heavily inspired from package `crop_image` - ideally we should put it back there. * `crop_helper.dart`: Crop Helper - which crop tool do we use, and the method to use it. * `new_crop_page.dart`: Page dedicated to image cropping. Pops the resulting file path if relevant. * `rotated_crop_controller.dart`: heavily inspired from package `crop_image` BUT with the rotation feature - ideally we should put it back there. * `rotated_crop_image.dart`: heavily inspired from package `crop_image` BUT with the rotation feature - ideally we should put it back there. * `rotation.dart`: 90 degree rotations - ideally we should put it back in package `crop_image` Impacted files: * `image_crop_page.dart`: now relying on new class `CropHelper` in order to get the appropriate crop tool (e.g. old or new) * `pubspec.lock`: wtf * `pubspec.yaml`: added package `image` for good performances regarding image encoding * `user_preferences_dev_mode.dart`: added a "Use new crop tool" switch (default is `false`)
Codecov Report
@@ Coverage Diff @@
## develop #2872 +/- ##
==========================================
- Coverage 6.94% 6.67% -0.28%
==========================================
Files 229 235 +6
Lines 11155 11646 +491
==========================================
+ Hits 775 777 +2
- Misses 10380 10869 +489
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@monsieurtanuki could we please add a padding so that gestures do not interfere with the actual cropping? |
I'm not against an evolution but I don't understand what bothers you here. The only gestures I see here are linked to the 4 corners of the crop tool, and the rotate and OK buttons. I don't see the interference: in which cases would that be? |
System edge swipe on Android, which will change the foreground app |
@teolemon You mean from the bottom? I assumed that the "action bar" (rotate + ok) was enough, but I can add a padding, fair enough. |
packages/smooth_app/lib/tmp_crop_image/rotated_crop_controller.dart
Outdated
Show resolved
Hide resolved
@monsieurtanuki thank you! It's also from the left and the right sides, because with system gestures we get the "go back" action if sliding from the left or right side |
@VaiTon I'm not sure about that: the crop tool is considered as a (full size) modal dialog. |
@VaiTon For the record I'm not replacing the previous crop tool, I only make another crop tool available: users would have to go to dev mode in order to select the new crop tool. |
@monsieurtanuki that's good! Let's merge and I'll tell you if it interferes with navigation gestures :) |
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.
Nothing that shocks me here when scimming over it, I agree with @VaiTon lets merge and test, thanks @monsieurtanuki
@VaiTon Don't hesitate to test the new crop tool! |
New files:
crop_grid.dart
: heavily inspired from packagecrop_image
- ideally we should put it back there.crop_helper.dart
: Crop Helper - which crop tool do we use, and the method to use it.new_crop_page.dart
: Page dedicated to image cropping. Pops the resulting file path if relevant.rotated_crop_controller.dart
: heavily inspired from packagecrop_image
BUT with the rotation feature - ideally we should put it back there.rotated_crop_image.dart
: heavily inspired from packagecrop_image
BUT with the rotation feature - ideally we should put it back there.rotation.dart
: 90 degree rotations - ideally we should put it in packagecrop_image
Impacted files:
image_crop_page.dart
: now relying on new classCropHelper
in order to get the appropriate crop tool (e.g. old or new)pubspec.lock
: wtfpubspec.yaml
: added packageimage
for good performances regarding image savinguser_preferences_dev_mode.dart
: added a "Use new crop tool" switch (default isfalse
)What
Screenshot
Fixes bug(s)