-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Image editing: batch editing in cropper component #23284
Conversation
Size Change: -576 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
Would we then be able to drop the specific edit endpoints and just use |
When moving all edits within react-easy-crop there isn't an option to rotate without cropping to one of the preset aspect ratios. I think that you're right about the flip probably being a lesser used feature, but I think it's important to be able to rotate without cropping. |
@ajlende I’ll add it tomorrow morning |
@TimothyBJacobs yes let’s drop the other endpoints and also keep the whole api experimental |
I like this path, it allows us to simplify the flow a bit (going through the Apply action). I also think it's good to mark the endpoints experimental, it seems like a model we should be willing to try in general as it'll allow us to gather feedback from developers widely during a cycle before committing to a final shape. |
A few notes:
Design:
|
@mtias Yes, I see some issues too when applying the image. Looks like something isn't processed on the server. I'll have a look. Agree on Zoom. Let's try to move it to the toolbar in a separate PR. |
55b1e01
to
01a93a0
Compare
Fixed
Not sure if I have the same problem, but I do have problems with square aspect ratio, which I'm looking into now. Seems like sometimes cropping on the server is not correct, probably instructions being processed wrong.
Let's do that when we work on the other zoom things.
Fixed
Fixed
Fixed
Partly fixed. The general block buttons will have to be hidden in a special way as they're out of the block's control. Removed the other buttons though.
Separate PR |
e7228ea
to
e226544
Compare
So is this creating a new record in the media library? |
@TimothyBJacobs Once you apply the edits, yes |
In that case, can we instead return the results of a $path = '/wp/v2/media/' . $attachment_id;
$response = rest_do_request( $path );
if ( ! $response->is_error() ) {
$response->set_status( 201 );
$response->header( 'Location', rest_url( $path ) );
} |
@TimothyBJacobs Let's review the REST API endpoint separately. For this PR, I'd like to focus on doing the edits in a single request on apply and some user facing polish. I'm going to merge this PR since we'd like to include it for the Gutenberg release. |
Sure thing, is there an open issue for the PHP side of things? Does this invalidate #22959? I'm having trouble tracking the related issues.
The endpoint's return value would impact the client code. So if this Gutenberg release is the same as the 5.5 release, it'll need to be addressed before then as well. |
Description
The difference with #22959 is that this uses the cropper for all edits. To do this, I've removed flipping for now, which is probably a lesser used feature anyway. I copied the PHP from the other PR. The purpose of this PR is to unblock iterations and possibly remove the experimental flag for the next GB release.
How has this been tested?
Screenshots
Types of changes
Checklist: