-
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
WIP: Add inline image resizing UI #13737
Conversation
@jasmussen I might need your help with the design of this. :) Ideally it should look a bit like the link input pop up. Should the input have a label? It's otherwise unclear what the input field is for? Feel free to change anything on this PR! |
@jasmussen Thanks! The image block has resize handles that we added. Currently the inline images have resize handles that TinyMCE added. I'm trying to add some minimal accessible UI to the inline images when we pull out TinyMCE, so resizing is still possible. As this is a lesser used feature, adding resize handles is not a top priority. |
Works for me. Shine on! |
bd11d48
to
38cb03d
Compare
e25927e
to
dfc532c
Compare
Rebased. Seems to work fine now. There's a small issue with the image format that is more obvious after this PR. The image object receives boundaries, but it shouldn't, as it's just an object, and at those boundaries, the UI is displayed. This issue as already present in
With a separate key for objects, all these issues would go away. Perhaps something similar should be done for line separator formats (read: lists). |
Some issues:
|
It's like the link input. Without enter, the image would continuously change in size. |
This is an issue in |
I thought this issue would be gone after f96dbe0. Could reproduce before but not after. |
Thanks @noisysocks! Cc @jasmussen for the design. I think the pop up should look closer to the one we have for links. |
* Basic functionality * Only update width on submit * Fix styles * Push a little polish * Select objects when clicked * Fix getDerivedStateFromProps * Reselect image after update * Move PositionedAtSelection * Export PositionAtSelection in same way we export other @wordpress/components
* Basic functionality * Only update width on submit * Fix styles * Push a little polish * Select objects when clicked * Fix getDerivedStateFromProps * Reselect image after update * Move PositionedAtSelection * Export PositionAtSelection in same way we export other @wordpress/components
Description
This PR adds UI to resize inline images. This is a more hidden feature. This PR should aim to add the minimum UI needed so that the image dimensions can be changed without TinyMCE's resize handles.
PostitionedAtSelection
be moved to therich-text
package or thecomponents
package?How has this been tested?
Screenshots
Types of changes
Checklist: