Automattic / Automattic/jetpack
Post and comment likes: make them fully block-based
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### What
Fully support Like and Comment Like blocks instead of the_content/comment_text filters
### How
If you go to Jetpack Sharing settings, the "Sharing buttons" feature warns you that you're dealing with a legacy feature and that you should use the "Sharing Buttons" block.
The "Like buttons" feature doesn't show such a warning. But it should 🙂
When I enable the `likes` or `comment-likes` module/feature, two things happen:
1. the module extends the wp-admin view for posts/comments by adding a column with likes.
2. the module hooks into the `the_content`/`the_excerpt`/`comment_text` filters and adds the post/comment Like widget to the markup.
There should be a possibility to:
1. Keep the wp-admin extensions.
2. Disable the filters and add the "Like" and "Comment Like" buttons by adding the respective blocks to my templates.
Currently this is not possible: if I have "Like buttons" enabled and I add the "Like" block to my template, I will see the "Like" button twice. The "legacy" and "block-based" Likes don't work together well.
Additionally, the "Comment Like" block currently doesn't exist at all, it's a feature gap.
Contributor guide
Research direction
Start with the Jetpack likes and comment-likes modules, the wp-admin post/comment extensions, and their the_content, the_excerpt, and comment_text filters. Trace how the existing Like block is registered and where the missing Comment Like block belongs; done means templates can use the blocks without duplicate legacy buttons while the admin like columns remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100