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
ntsekouras
left a comment
There was a problem hiding this comment.
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
classNameusage ineditmethod. It's handled withuseBlockPropsso 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.jsfiles for terms that need renaming or removal).