-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add image and video transformations in Media & Text block #11420
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
Add image and video transformations in Media & Text block #11420
Conversation
0dd4e7b to
303c1dc
Compare
303c1dc to
025b551
Compare
| alt: mediaAlt, | ||
| id: mediaId, | ||
| url: mediaUrl, | ||
| } ); |
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.
What about the text of the inner blocks? Should we just return them in addition to this block to keep them after the image block?
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.
I thought about it, but unfortunately, our transforms API does not pass the child blocks. I think it would be a nice improvement in the API and I can work on it. At the time I did not add this because I was not sure if it collided with the freeze. I think we may manage to get something working without breaking any back compatibility I can give it a try.
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.
I think this is fine. This change, to me, is mostly about the ergonomics of quickly switching between "image-type" blocks. In the future, a more comprehensive transform will be a welcome addition; until then, the Undo button is what allows the user to try a conversion and roll back at any time.
| alt: mediaAlt, | ||
| id: mediaId, | ||
| url: mediaUrl, | ||
| } ); |
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.
I think this is fine. This change, to me, is mostly about the ergonomics of quickly switching between "image-type" blocks. In the future, a more comprehensive transform will be a welcome addition; until then, the Undo button is what allows the user to try a conversion and roll back at any time.
|
Thank you for the reviews! |
Description
This pr adds "Media & Text" <-> Video, Image transforms.
How has this been tested?
Add a video block. Transform it to Media & Text and verify it worked as expected.
Add an image block. Transform it to Media & Text and verify it worked as expected.
Transform both blocks back to video and image.
Add a media text block select an image and transform it to image block.
Add a media text block select a video and transform it to video block.
Transform the image and videos back to media & text.