Skip to content

Editor: Register emoji reactions comment meta for Notes#10930

Open
adamsilverstein wants to merge 4 commits intoWordPress:trunkfrom
adamsilverstein:backport-note-reactions-meta-70
Open

Editor: Register emoji reactions comment meta for Notes#10930
adamsilverstein wants to merge 4 commits intoWordPress:trunkfrom
adamsilverstein:backport-note-reactions-meta-70

Conversation

@adamsilverstein
Copy link
Member

@adamsilverstein adamsilverstein commented Feb 14, 2026

Summary

Register the _wp_note_reactions comment meta in wp_create_initial_comment_meta(), alongside the existing _wp_note_status meta. This meta stores emoji reaction data for the block editor's collaborative Notes feature.

Data Model

Each emoji key (e.g., "👍", "❤️") maps to an array of reaction objects:

{
  "👍": [
    { "userId": 1, "date": "2025-01-15T10:30:00" },
    { "userId": 2, "date": "2025-01-15T11:00:00" }
  ],
  "❤️": [
    { "userId": 1, "date": "2025-01-15T10:35:00" }
  ]
}

REST Schema

  • Type: object
  • Single: true
  • Default: [] (empty array)
  • additionalProperties: Each property is an array of objects with:
    • userId (integer) — The reacting user's ID
    • date (string|null, date-time format) — When the reaction was added

Auth

Uses the same edit_comment capability check as _wp_note_status.

References

Add `_wp_note_reactions` comment meta registration to
`wp_create_initial_comment_meta()`. This meta stores emoji
reaction data for the block editor's collaborative Notes
feature, complementing the existing `_wp_note_status` meta.

The meta is registered as an object type with a REST schema
that describes the data model: each emoji key maps to an
array of objects containing `userId` (integer) and `date`
(date-time string or null).

See WordPress/gutenberg#75148

Props adamsilverstein.
Fixes #.
@github-actions
Copy link

github-actions bot commented Feb 14, 2026

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.

Core Committers: Use this line as a base for the props when committing in SVN:

Props adamsilverstein, westonruter, noruzzaman.

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

}
}
},
"authentication": [],
Copy link
Member

Choose a reason for hiding this comment

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

Why did this changed? Stale from a previous commit?

Copy link
Member Author

@adamsilverstein adamsilverstein Feb 14, 2026

Choose a reason for hiding this comment

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

yes, I ran the test_build_wp_api_client_fixtures test locally to regenerate fixtures and this was the result. I wrote that test so I'm confident this is correct, but happy to add in a separate PR since its unrelated to the current changes. ideally we should have a check similar to package lock that checks if running the regeneration changes the fixture and reject the merge if so.

Comment on lines -4882 to +4887
"properties": [],
"properties": {
"wp_pattern_sync_status": {
"type": "string",
"title": "",
"description": "",
"default": "",
"enum": [
"partial",
"unsynced"
]
}
},
Copy link
Member

Choose a reason for hiding this comment

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

I guess this fixture wasn't updated correctly for a previous commit that introduced this?

Copy link
Member Author

Choose a reason for hiding this comment

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

correct. you can verify by running the test_build_wp_api_client_fixtures test locally to regenerate fixtures. the file should match what you see in this PR. (I used WP_TESTS_DIR=/Users/adamsilverstein/repositories/wordpress-develop/tests/phpunit/ DB_PASSWORD=**** php ./vendor/bin/phpunit --verbose -c ./phpunit.xml.dist --filter=test_build_wp_api_client_fixture)

'show_in_rest' => array(
'schema' => array(
'type' => 'object',
'additionalProperties' => array(
Copy link
Member

Choose a reason for hiding this comment

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

Can patternProperties be used instead? This could add constraints for what emoji are allowed as keys.

adamsilverstein and others added 3 commits February 14, 2026 14:53
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants