-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Text Columns → Columns transform #9364
Add Text Columns → Columns transform #9364
Conversation
I don't want to derail this PR, but I'm super curious if this has been discussed in the past. This feels like a great opportunity to improve the deprecation experience. |
@chrisvanpatten If it has been discussed before, I don't know about it. 🤷♂️ I agree that it would be great to have that kind of functionality, and I'm also curious if it has been discussed before. |
align: [ 'wide', 'full' ], | ||
supports, | ||
|
||
transforms: { |
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.
Can we move the declaration of this transform the the text-columns
block instead (to
transform) that way when/if we remove the block, we don't forget the transform.
@youknowriad Addressed feedback; the transform is now defined in |
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.
LGTM 👍 Thanks
@youknowriad This should be added to the 3.7 milestone. |
Description
This PR adds a one-way Text Columns → Columns transform to make it easier to migrate from the deprecated block. The alignment, custom CSS classes, and content are all preserved.
How has this been tested?
You can test this branch by copy-pasting this markup into a post and trying out the transforms on the Text Columns blocks:
Additional notes
Ideally, you would want to automatically transform deprecated blocks into the recommended replacements, but the deprecated blocks API does not currently support migrating from/to a completely different block, so using the transforms API to allow for easy user-initiated transforms is currently the best option.
Checklist:
Related issues and PRs