-
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 resizing issues #11702
Comments
#11377 is working on a major revamp of how image scaling works under the hood. There are some limitations in WordPress we're trying to fix up to make this a better and more performant experience. In terms of UI, I honestly never noticed that are using the row and column resize cursors instead of the more general north/south and east/west cursors, but now that you mention it… sure enough! @jasmussen by any chance do you know if that an intentional decision? I feel like if anyone would know it'd be you :) If it wasn't intentional, I agree that could be a quick win. I also do wonder if adding a corner resize option would be more clear. I'm not sure we have time to land that before 5.0, but it is a good point — having a corner option might be more intuitively understood. Adding |
This is a good observation. It is intentional insofar as it hasn't seemed very useful to allow you to skew the image. Additionally the handle is used in other interactions also, such as this one: In this case, it feels right to me that the entire image is scaled up with proper aspect ratio, as that' sthe point of the block. Similarly, the cover block is likely at some point in the future to receive a drag handle on the bottom edge, to control the height of that block. This would also not skew, since the image contents of that is a background image that's centered and set to cover. However it is a nonstandard interaction for the Image element, and the point of this ticket seems valid to address. A solution seems to be that for a left aligned image, we show a single drag handle in the bottom right corner to indicate the direction of scale. For centered images, presumably bottom left and bottom right could have the handle. For right aligned it would be bottom left. |
yes I agree with that @jasmussen - I had assumed the intention was to not allow it to be skewed, but wanted to provide all my expectations when playing with the tool and control. I think given the plans for the future it makes sense to do the resize handle in the corners that you mentioned. In the media example you're showing - I agree it feels right in that context, but it also feels like the resizing on the side of the image is trying to overcome not having resizable columns in a way. I |
I'm going through older issues and saw this one was still open. After reading through this and testing against the latest version, I'm closing this out as there aren't any active bugs mentioned in the list above and the rest is more general feedback that's been given context at this point. Feel free to reopen if that's incorrect! |
Describe the bug
a. I don't understand the point of having drag handles on both the bottom and side when they are both just resizing the image. Intuitively I thought that dragging the left side would make the image wider, and dragging the bottom would make it taller. If these are just resizing, then why not use the standard way people are familiar with for resizing. It's a known way of interacting with resizables, and if both handles do the same thing that's a good indication that the wrong ui is in use.
b. Since I really just needed the image resized proportionally I decided to use the options in the side panel that have numbers in them. I'm not sure what these numbers are for, or what they are supposed to do. They should clearly label what they are modifying for users. I assume they are meant for changing the image width and height in pixels (px), so a label for the units should be added.
When I added an image, this is this how it was displayed with the resizing options:
After changing the height field to something smaller, the image was not resized in the editor, and the content following it moved up and the drag handle on the bottom was moved up over the image:
c. Sometimes the control in the side panel for width and height doesn't do anything at all. Most of the time it's just another way to proportionally scale the image - even though the width and height values are not linked.
d. Sometimes when I press the arrows in the input box for width and height, they go from their current value to zero, and move up and down starting from 0, which is annoying to figure out.
e. As the image in the editor can be resized proportionally, then the values for width and height should have an option to link or unlink the values inside to allow for unproportional image resizing, or in the very least these two values should be locked together in proportion so the user actually knows they can't do what they expect.
f. The image block makes me think I'm inserting an image, and consequently I don't think the cusor should be displaying the cusor for resizing a column and resizing a row. This can be confusing if resizable columns and rows are introduced into gutenberg as those are actually the cursors I'd expect to be present for that functionality.
Also see #8610
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Overall - I don't feel like this control provides a very good user experience or much of the functionality I'd expect one of the most fundamental blocks to have behind it. I think that introducing proper scaling and resizing would help make this block useful.
In comparing gutenberg's image block scaling, I would suggest looking at how tinymce handles image scaling as they are using appropriate cursor handles and handle placements for scaling images.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Tested using twenty-ninteen theme and gutenberg latest svn release as well as master branch
The text was updated successfully, but these errors were encountered: