-
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
Block Library: Deprecate the Post Comment block #36032
Conversation
Size Change: +179 B (0%) Total Size: 1.08 MB
ℹ️ View Unchanged
|
a373dda
to
2e60d58
Compare
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.
Thanks Grzegorz! Looks good! 👍
Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>
We're going to ship Post Comments in WP 5.9 as the Comments Query Loop isn't ready (see #35979 (comment)). So please wait until after Gutenberg 11.9 / WordPress 5.9 before merging this. |
It doesn't need to wait. There are two blocks: Post Comments and Post Comment. This PR deprecates only the Post Comment block that was never close to useful - you had to explicitly pass the comment id to display content. Post Comments doesn't use Post Comment internally. |
Aha, my mistake 😄 |
Description
Now that Comments Query Loop and Comment Template blocks are up and running we can finally deprecate the Post Comment block. The procedure is similar to what we did to the Text Columns block in the past:
In this case, we might be able to remove the block completely after a few Gutenberg plugin releases because this block never went out of the experimental phase.
In addition to that, I update all blocks to use the Comment Template block as a template. I also changed the title, description, and category of several blocks to align with how Query Loop related blocks look like.
Bonus refactoring is based on the comment from @michalczaplinski in #35965 (comment) about the redundant
className
usage inedit
method. It's handled withuseBlockProps
so we can remove it.How has this been tested?
Screenshots
All blocks in action inside the template:
https://user-images.githubusercontent.com/699132/139238006-d2d2610a-4023-4c5e-8019-e01dba733f36.mov
HTML inside the block editor (it contains all custom class names applied):
HTML on the frontend (it contains all custom class names applied):
Searching in the inserter inside the Comment Template block:
Searching in the inserter outside of the Comment Template block:
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).