-
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
Deprecate Subheading block #9355
Deprecate Subheading block #9355
Conversation
Love this approach! |
@chrisvanpatten Thanks! I took a look at #8036 and applied a similar approach here, this time changing the visible title and description (the latter of which was really misleading) to indicate the deprecation status of the block. |
@@ -7,6 +7,7 @@ Gutenberg's deprecation policy is intended to support backwards-compatibility fo | |||
- `wp.editor.getColorName` has been removed. Please use `wp.editor.getColorObjectByColorValue` instead. | |||
- `wp.editor.getColorClass` has been renamed. Please use `wp.editor.getColorClassName` instead. | |||
- `value` property in color objects passed by `wp.editor.withColors` has been removed. Please use color property instead. | |||
- The Subheading block has been removed. Please use the Paragraph block instead. |
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 deprecating blocks is special and we shouldn't remove it in 3.9.0. We may remove it later when we merge to Core or when we build a deprecated versions across blocks. So I'd suggested removing this.
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.
Notably, the same kind of message was put in the 3.5.0 section for the Text Columns block, which is why I put this message here. I will remove my message and create a separate PR for removing the one that was created for the Text Columns 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.
Oh maybe let's keep for now then for the sake of consistency. It could be argued that it "encourages" people to migrate.
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.
Wow, that was fast! I actually pushed a commit to remove the message, but it looks like you merged the branch before I did that, so I guess I will just delete the branch now. 😛
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 👍
Description
This PR deprecates the Subheading (
core/subhead
) block. It removes the Subheading block from the inserter. It also removes the Paragraph→Subheading transform and improves the Subheading→Paragraph transform to preserve custom CSS classes. It also changes the visible title and description of the Subheading block to indicate that it is deprecated.Fixes #9308 and closes #5475, #8141, #8234, and #8716.
Additional notes
When should the Subheading block be removed entirely? I have noticed that the Text Columns block still technically exists despite being deprecated in 3.3.
Currently, there is no way to migrate from a deprecated/removed block to another block automatically. Should this feature be added before the Text Columns and Subheading blocks are removed entirely?
Related issues and PRs