Media & Text: fix content loss from transform + add text transform#64540
Media & Text: fix content loss from transform + add text transform#64540
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +46 B (0%) Total Size: 1.85 MB
ℹ️ View Unchanged
|
stokesman
left a comment
There was a problem hiding this comment.
It might be better to have a single well-labeled transform, I'm not sure. But currently this is not possible.
That does seem like it would be ideal. Further, I think most any container block should feature the equivalent of the Group block’s "Ungroup" (maybe "Unwrap"). The exception I can think of would be Column as it can’t dump its inner blocks directly into the parent Columns.
In the mean time it makes sense to do this so content isn’t lost.
67b563a to
2e594b7
Compare
2e594b7 to
feebfe0
Compare
There was a problem hiding this comment.
Transformation doesn't work properly when the media is video - video block gets created, but the media is reset.
a89c9c03d284cd86642151f614ae45b2.mp4
There are two other things that need to be fixed:
- If the "Use featured image" is enabled, I think it should be transformed to a Post Featured Image block instead of an image block.
- If the Image block is disabled, the transrorm to the Paragraph block menu item is visible but has no effect.
What?
See #63635.
Currently the image and video transforms dump all the text you have next to the media.
The image, video and the newly introduced paragraph transform are all the same transform. They just transform the block into the base blocks.
It might be better to have a single well-labeled transform, I'm not sure. But currently this is not possible. The quote block is actually a bit similar: the "paragraph" transform actually converts it to the inner blocks, so it's also mislabelled.
Why?
You shouldn't lose your content.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast