Skip to content

Remove experimental status from comments count and comment link blocks #69832

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

Merged
merged 2 commits into from
Apr 9, 2025

Conversation

carolinan
Copy link
Contributor

What?

Remove experimental status from comments count and comment link blocks.
Closes #69831

Why?

There is no reason to keep them as experimental or limited to the Site Editor only.

How?

By removing the experimental attribute from block.json.

Testing Instructions

After applying and building the pull request, create a new post and insert the two blocks: comments count and comment link.
If the single post does not already have a comment area, add a comments block.
Save.
Confirm that both blocks show the correct number of comments: 0 and "No comments".
Confirm that on the front, the comment link block scrolls to the comment area using the anchor #respond

Next, test the blocks with comments present. Add one or more comments.
Confirm that both blocks show the correct number of comments.
Confirm that on the front, the comment link block scrolls to the comment area using the anchor #comments

@carolinan carolinan added [Type] Enhancement A suggestion for improvement. [Block] Comment Link Affects the Comment Link Block [Block] Comments Count Affects the Post Comments Count Block labels Apr 5, 2025
@carolinan
Copy link
Contributor Author

Error: Missing @since tag for the "render_block_core_post_comments_link()" function.
Error: Missing @since tag for the "register_block_core_post_comments_link()" function.
Error: Missing @since tag for the "render_block_core_post_comments_count()" function.
Error: Missing @since tag for the "register_block_core_post_comments_count()" function.
Error: Process completed with exit code 1.

These are not introduced in this PR, but let me fix them.

@carolinan carolinan marked this pull request as ready for review April 5, 2025 07:05
Copy link

github-actions bot commented Apr 5, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for this change, but it might be a good idea to get second approval from other core members. cc @WordPress/gutenberg-core

If we want to be more careful and incremental, we might be able to change the value to true to make it available outside of the site editor on the Gutenberg plugin, but I don't think there's any major issues with these two blocks:

P.S. I suggest not using the fse value itself. See #64079

@Mamaduka
Copy link
Member

Mamaduka commented Apr 8, 2025

What was the initial hesitation to enable these blocks for all editors?

@t-hamano
Copy link
Contributor

t-hamano commented Apr 8, 2025

What was the initial hesitation to enable these blocks for all editors?

I read the PRs below but couldn't find any reason:

After some more research, it seems that the original purpose of these blocks was to have all the functionality of template tags in FSE:

This may be why they weren't initially allowed outside of the site editor. But the fact is, these blocks can be used outside of the site editor and templates.

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the additional details, @t-hamano!

It seems fine to remove this experimental flag for these blocks, but let's be careful not to apply a general rule to all similar blocks.

@t-hamano
Copy link
Contributor

t-hamano commented Apr 8, 2025

Just to be sure: this PR will ship two new blocks in WordPress 6.9.

@Mamaduka
Copy link
Member

Mamaduka commented Apr 8, 2025

Just to be sure: this PR will ship two new blocks in WordPress 6.9.

That will be the case. I thought blocks with the " __experimental": "fse"` flag were shipping in core but were only enabled in Site Editor. It seems I was wrong 😄

@t-hamano t-hamano merged commit e49849c into trunk Apr 9, 2025
68 checks passed
@t-hamano t-hamano deleted the update/stabilize-comment-blocks branch April 9, 2025 01:45
@github-actions github-actions bot added this to the Gutenberg 20.7 milestone Apr 9, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
WordPress#69832)

* Comment blocks: Remove the experimental attribute from block.json

* Coding standards: Add the since in index.php

Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Comment Link Affects the Comment Link Block [Block] Comments Count Affects the Post Comments Count Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove experimental status from comment count and comment link blocks
3 participants