Skip to content

Add a Counts style to the Reactions block - #3917

Merged
pfefferle merged 5 commits into
trunkfrom
add/reactions-counts-style
Oct 21, 2026
Merged

pfefferle merged 5 commits into
trunkfrom
add/reactions-counts-style

Conversation

@pfefferle

@pfefferle pfefferle commented Oct 20, 2026 •

Copy link
Copy Markdown
Member
Screenshot 2026-10-20 at 11 31 06

Proposed changes:

  • The Reactions block gets a third style, "Counts". It is mainly meant to replace the comments link in a query loop: one line of plain links with the comment count and every reaction type, without overlays and without the Interactivity API.
  • Comments link to get_comments_link() and use core's "%s Comment" labels. Likes, reposts and quotes link to the post, where the full Reactions block lists them. Reaction types with no entries are hidden. The comment count shows as long as comments are open.
  • Labels ("3 Comments", "9 likes") are on by default and can be turned off in the block settings to show only icons and numbers.
  • The icons are part of the comment type registry: icon is now an SVG instead of an emoji. On WordPress 7.1+ it comes from wp_get_icon( 'core/<type>' ), with a bundled SVG as fallback. Blocks::get_reaction_types() adds comments in front and feeds both the server render and the editor preview, so a new comment type with an icon and count labels shows up automatically.
  • Text colour is now offered by default in the block's Color panel.
  • The Discussion setting "Show Avatars" now also hides avatars when the Facepile style was chosen explicitly. Before, it only decided the default style.

Other information:

  • Have you written new tests for your changes, if applicable?

The emoji in the comment type icon are replaced by SVG markup. Nothing in the plugin used them, but code that reads the registry gets markup now.

Testing instructions:

  • Add the Fediverse Reactions block to a query loop and choose the "Counts" style.
  • Check the front end: one line with comments, likes, reposts and quotes as links, only for types with entries.
  • Turn off "Show labels" in the block settings: only icons and numbers remain.
  • Set a text colour and a font size: icons and text follow.

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Add a Counts style to the Fediverse Reactions block that shows comments and reactions as a line of simple links, for example to replace the comments link in a query loop.

The entry is already part of the branch.

@pfefferle pfefferle self-assigned this Oct 20, 2026
@pfefferle
pfefferle requested a review from a team October 20, 2026 09:38
@github-actions github-actions Bot added [Block] Reactions [Feature] Reactions [Focus] Editor Changes to the ActivityPub experience in the block editor [Tests] Includes Tests labels Oct 20, 2026
@pfefferle

Copy link
Copy Markdown
Member Author

/cc @kaffeeringe I think this fits even better with your needs!?

@pfefferle
pfefferle merged commit 0804329 into trunk Oct 21, 2026
12 checks passed
@pfefferle
pfefferle deleted the add/reactions-counts-style branch October 21, 2026 11:33
@kaffeeringe

Copy link
Copy Markdown

Yes. That looks nice!
I am not sure you need both: the icon and the written word. Look: https://fotos.kaffeeringe.de/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Reactions [Feature] Reactions [Focus] Editor Changes to the ActivityPub experience in the block editor [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants