Skip to content

Feat: Reactions plugin intergration#415

Open
Trochonovitz wants to merge 15 commits into
masterfrom
feat/reactions-plugin-intergration
Open

Feat: Reactions plugin intergration#415
Trochonovitz wants to merge 15 commits into
masterfrom
feat/reactions-plugin-intergration

Conversation

@Trochonovitz

Copy link
Copy Markdown

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.

@Trochonovitz Trochonovitz added enhancement New feature or request feature request Community feature request labels Jun 16, 2026
@Trochonovitz Trochonovitz linked an issue Jun 16, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.48%. Comparing base (e7c709f) to head (1f6e1ef).

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     
Flag Coverage Δ
unittest 99.48% <100.00%> (+1.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@CodeVoyager CodeVoyager self-requested a review June 20, 2026 08:12
Comment thread admin/src/components/CommentReactionsSummary/index.tsx Outdated
Comment thread admin/src/components/CommentReactionsSummary/index.tsx Outdated
Comment thread admin/src/pages/Details/DetailsEntry.tsx Outdated
Comment thread admin/src/translations/pl.ts Outdated
Comment thread admin/src/utils/reactionsIntegration.ts Outdated
Comment thread admin/src/utils/reactionsIntegration.ts Outdated
@Trochonovitz Trochonovitz requested a review from CodeVoyager June 23, 2026 08:04
locale,
}) => {
const typesQuery = useReactionTypes();
const countsQuery = useReactionCounts(documentId!, locale);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Much better, but assertion is left.

Comment on lines +13 to +15
if (!documentId) {
throw new ValidationError('documentId is required to fetch reaction counts');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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

Labels

enhancement New feature or request feature request Community feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide built-in integration with strapi-plugin-reactions

2 participants