Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9e4bfb3
Add ReactionEmojiPicker component for Notes
adamsilverstein Feb 2, 2026
461eead
Add ReactionDisplay component for Notes
adamsilverstein Feb 2, 2026
3432f96
Add ReactionDetailsPopover component for Notes
adamsilverstein Feb 2, 2026
6a8a24b
Add reaction CRUD functions to useBlockCommentsActions
adamsilverstein Feb 2, 2026
426927f
Integrate emoji reactions into Notes UI
adamsilverstein Feb 2, 2026
866d095
Add styles for emoji reactions in Notes
adamsilverstein Feb 2, 2026
d440bba
Add E2E tests for emoji reactions in Notes
adamsilverstein Feb 2, 2026
f996e50
Merge trunk and fix emoji reaction E2E test failures
adamsilverstein Feb 5, 2026
2b793d6
Fix emoji reaction button: use smiley icon, fix focus, and improve st…
adamsilverstein Feb 5, 2026
1b66eb9
Move emoji reaction button to header and register _wp_reactions meta
adamsilverstein Feb 5, 2026
9f3c8e4
Fix emoji reaction pills dark background
adamsilverstein Feb 5, 2026
b12a044
Override Button is-pressed style on reaction pills
adamsilverstein Feb 6, 2026
427f25d
Make reaction pill buttons more circular
adamsilverstein Feb 6, 2026
d4d39e3
update docblock
adamsilverstein Feb 6, 2026
de66f7d
Refactor to use 'Composite' component
Mamaduka Feb 6, 2026
888c837
Move _wp_reactions meta to wordpress-7.0 compat
adamsilverstein Feb 6, 2026
a031099
Remove unnecessary login checks from reaction handlers
adamsilverstein Feb 6, 2026
bbb61a9
Remove reflowComments from reaction handlers
adamsilverstein Feb 6, 2026
b28f67e
Batch user fetching in reaction details popover
adamsilverstein Feb 6, 2026
39f9d35
Update reaction button icon per design feedback
adamsilverstein Feb 6, 2026
e4f9139
Replace thumbs down reaction with thinking emoji
adamsilverstein Feb 6, 2026
30d4a7e
type fix
adamsilverstein Feb 6, 2026
b2b46d1
Linter and styling fixes
adamsilverstein Feb 6, 2026
b9f1383
Store emoji slugs in database instead of emoji characters
adamsilverstein Feb 10, 2026
d7445c7
Use Button component in emoji picker / simplify CSS
adamsilverstein Feb 10, 2026
2c1526c
finish switch to button and emoji as slugs
adamsilverstein Feb 10, 2026
240c410
Make emoji reaction picker vertical
adamsilverstein Feb 10, 2026
792ac67
Reduce emoji reactions to five skin-tone-safe options
adamsilverstein Feb 10, 2026
b1c9d35
more style cleanup
adamsilverstein Feb 10, 2026
bd8064d
Use Button component in emoji picker to reduce CSS
adamsilverstein Feb 10, 2026
765605e
Improve reaction button styling
adamsilverstein Feb 10, 2026
31d15de
Rename _wp_reactions meta key to _wp_note_reactions
adamsilverstein Feb 13, 2026
2e71e3d
Apply suggestion from @t-hamano
adamsilverstein Feb 13, 2026
1afeb81
Move currentUserId selector into ReactionDisplay
adamsilverstein Feb 13, 2026
1d3fe41
Replace reaction details popover with tooltips
adamsilverstein Feb 13, 2026
ebc07c5
Consolidate reaction functions into onToggleReaction
adamsilverstein Feb 13, 2026
9edaaca
Move reaction button to comment content area
adamsilverstein Feb 13, 2026
e9c5b6c
Add missing primitives reference to editor tsconfig
adamsilverstein Feb 13, 2026
6b092af
Fix CI: update package-lock.json and E2E emoji reaction tests
adamsilverstein Feb 13, 2026
2f5d925
Close emoji picker popover after selecting a reaction
adamsilverstein Feb 13, 2026
1f02b4f
Update packages/editor/src/components/collab-sidebar/style.scss
adamsilverstein Feb 14, 2026
96ff549
Update lib/compat/wordpress-6.9/block-comments.php
adamsilverstein Feb 14, 2026
335ad3d
Add backport changelog entry for core PR 10930
adamsilverstein Feb 14, 2026
cbc4d99
move backport changelog to 7.0
adamsilverstein Feb 14, 2026
10f745d
Switch emoji reactions to custom comment type
adamsilverstein Feb 15, 2026
941b736
Add backport changelog entry for PR 75549
adamsilverstein Feb 15, 2026
6b21598
Show add-reaction button on touch devices
adamsilverstein Feb 15, 2026
7117448
Show add-reaction button only on hover on desktop
adamsilverstein Feb 15, 2026
a9f1490
Merge branch 'add-notes-emoji-reactions' into add-notes-emoji-reactio…
adamsilverstein Feb 15, 2026
e304dff
Add note_reaction_emojis filter for emoji list
adamsilverstein Feb 15, 2026
52690b2
Inject note reaction emojis into editor settings
adamsilverstein Feb 15, 2026
869c89e
Read reaction emojis from editor settings
adamsilverstein Feb 15, 2026
ea6413e
Use settings-based emoji list in ReactionDisplay
adamsilverstein Feb 15, 2026
cb92b59
Make reaction emoji list filterable via settings
adamsilverstein Feb 15, 2026
007854e
Move add-reaction button to reactions row
adamsilverstein Feb 16, 2026
857c84f
Simplify reaction placement and style from Mamaduka
adamsilverstein Feb 17, 2026
db5e541
Merge branch 'add-notes-emoji-reactions' into add-notes-emoji-reactio…
adamsilverstein Feb 17, 2026
3b2512d
Remove stray add_action for nonexistent metadata registration function
adamsilverstein Feb 17, 2026
b9e4284
Revert filterable emoji list for note reactions
adamsilverstein Feb 18, 2026
326c7ed
Rename note_reaction comment type to reaction
adamsilverstein Feb 18, 2026
5664b64
Move reaction PHP code to lib/compat/wordpress-7.1
adamsilverstein Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backport-changelog/7.0/10930.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://github.com/WordPress/wordpress-develop/pull/10930

* https://github.com/WordPress/gutenberg/pull/75148
* https://github.com/WordPress/gutenberg/pull/75549
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ public function create_item( $request ) {
* @param string $post_type Post type name.
* @return bool True if post type supports block comments, false otherwise.
*/
private function check_post_type_supports_notes( $post_type ) {
protected function check_post_type_supports_notes( $post_type ) {
$supports = get_all_post_type_supports( $post_type );
if ( ! isset( $supports['editor'] ) ) {
return false;
Expand Down Expand Up @@ -613,10 +613,11 @@ protected function check_is_comment_content_allowed( $prepared_comment ) {
}
}

add_action(
'rest_api_init',
function () {
$controller = new Gutenberg_REST_Comment_Controller_6_9();
$controller->register_routes();
}
);
/**
* Registers the Gutenberg REST comment controller for WordPress 6.9 compatibility.
*/
function gutenberg_register_comment_controller_6_9() {
$controller = new Gutenberg_REST_Comment_Controller_6_9();
$controller->register_routes();
}
add_action( 'rest_api_init', 'gutenberg_register_comment_controller_6_9' );
6 changes: 6 additions & 0 deletions lib/compat/wordpress-7.0/block-comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
/**
* Block comments compatibility for WordPress 7.0.
*
* @package gutenberg
*/
108 changes: 108 additions & 0 deletions lib/compat/wordpress-7.1/block-comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php
/**
* Block comments compatibility for WordPress 7.1.
*
* Extends note-related block comment functions to also handle
* the 'reaction' comment type for emoji reactions on notes.
*
* @package gutenberg
*/

/**
* Updates the comment type for avatars to include reactions.
*
* Replaces the 6.9 implementation to also add the 'reaction' type
* to the list of comment types for which avatars should be retrieved.
*
* @param array $comment_type The array of comment types.
* @return array The updated array of comment types.
*/
function gutenberg_update_get_avatar_comment_type_7_1( $comment_type ) {
$comment_type[] = 'note';
$comment_type[] = 'reaction';
return $comment_type;
}
remove_filter( 'get_avatar_comment_types', 'update_get_avatar_comment_type' );
add_filter( 'get_avatar_comment_types', 'gutenberg_update_get_avatar_comment_type_7_1' );

/**
* Excludes block comments and reactions from the admin comments query.
*
* Replaces the 6.9 implementation to also exclude 'reaction' type.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string[] $clauses The current SQL clauses for the comments query.
* @param WP_Comment_Query $query The current comments query.
*
* @return string[] The modified SQL clauses for the comments query.
*/
function gutenberg_exclude_block_comments_from_admin_7_1( $clauses, $query ) {
if ( isset( $query->query_vars['type'] ) && '' === $query->query_vars['type'] ) {
$query->set( 'type', '' );

global $wpdb;
$clauses['where'] .= " AND {$wpdb->comments}.comment_type != 'note' AND {$wpdb->comments}.comment_type != 'reaction'";
}

return $clauses;
}
remove_action( 'comments_clauses', 'exclude_block_comments_from_admin', 10 );
add_action( 'comments_clauses', 'gutenberg_exclude_block_comments_from_admin_7_1', 10, 2 );

/**
* Filter the comment count query to exclude notes and reactions.
*
* Replaces the 6.9 implementation to also exclude 'reaction' type.
*
* @param string $query The SQL query string.
* @return string The modified SQL query string.
*/
function gutenberg_filter_comment_count_query_exclude_block_comments_7_1( $query ) {
if ( str_starts_with( $query, 'SELECT comment_post_ID, COUNT(comment_ID) as num_comments FROM' ) && str_contains( $query, 'comment_approved' ) ) {
if ( ! str_contains( $query, "comment_type != 'note'" ) ) {
$query = str_replace( 'comment_approved', "comment_type != 'note' AND comment_type != 'reaction' AND comment_approved", $query );
}
}
return $query;
}
remove_filter( 'query', 'gutenberg_filter_comment_count_query_exclude_block_comments' );
add_filter( 'query', 'gutenberg_filter_comment_count_query_exclude_block_comments_7_1' );

/**
* Adjusts the comments list table query so notes and reactions never display.
*
* Replaces the 6.9 implementation to also handle 'reaction' type.
*
* @param array $args An array of get_comments() arguments.
* @return array Possibly modified arguments for get_comments().
*/
function gutenberg_hide_note_from_comment_list_table_7_1( $args ) {
if ( ! empty( $_REQUEST['comment_type'] ) && in_array( $_REQUEST['comment_type'], array( 'note', 'reaction' ), true ) ) {
unset( $args['type'] );
}
return $args;
}
remove_filter( 'comments_list_table_query_args', 'gutenberg_hide_note_from_comment_list_table' );
add_filter( 'comments_list_table_query_args', 'gutenberg_hide_note_from_comment_list_table_7_1' );

/**
* Override comment_count to exclude notes and reactions from the comment count.
*
* Replaces the 6.9 implementation to also exclude 'reaction' type.
*
* @param int|null $new The new comment count. Default null.
* @param int $old The old comment count.
* @param int $post_id Post ID.
* @return int|null The modified comment count.
*/
function gutenberg_exclude_notes_from_comment_count_7_1( $new_count, $old_count, $post_id ) {
global $wpdb;
if ( null !== $new_count ) {
return $new_count;
}
$new_count = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND comment_type != 'note' AND comment_type != 'reaction'", $post_id ) );
return $new_count;
}
remove_filter( 'pre_wp_update_comment_count_now', 'gutenberg_exclude_notes_from_comment_count', 10 );
add_filter( 'pre_wp_update_comment_count_now', 'gutenberg_exclude_notes_from_comment_count_7_1', 10, 3 );
Loading
Loading