Feat: Reactions plugin intergration#415
Open
Trochonovitz wants to merge 15 commits into
Open
Conversation
… documentId for single comment
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #415 +/- ##
==========================================
+ Coverage 98.40% 99.48% +1.07%
==========================================
Files 40 42 +2
Lines 1254 1350 +96
Branches 289 314 +25
==========================================
+ Hits 1234 1343 +109
+ Misses 20 7 -13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CodeVoyager
reviewed
Jun 20, 2026
CodeVoyager
approved these changes
Jun 23, 2026
| locale, | ||
| }) => { | ||
| const typesQuery = useReactionTypes(); | ||
| const countsQuery = useReactionCounts(documentId!, locale); |
Contributor
There was a problem hiding this comment.
Much better, but assertion is left.
Comment on lines
+13
to
+15
| if (!documentId) { | ||
| throw new ValidationError('documentId is required to fetch reaction counts'); | ||
| } |
Contributor
There was a problem hiding this comment.
Assertion can be refactor to
type NonEmpty<T> = T extends null | undefined ? never : T;
const assertNonEmpty = <T>(value: unknown, error = new Error("Value is empty")): asserts value is NonEmpty<T> => {
if (value === null || value === undefined) {
throw error;
}
};
or something similar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
#36
Summary
PR adds ready-made integration with the Reactions plugin through a single setting in the admin panel. This functionality enriches responses from endpoints with metadata for saved reactions.
Test Plan
Install the Reactions plugin and enable the integration on the settings page. Then, add reactions to your content and check the Comments endpoint - it should include information about these reactions, as well as metadata and a summary.