chore(message-parser): remove orphaned i18next pluralization TODO from Reaction component#39926
Conversation
…m Reaction component
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughA stale TODO comment regarding i18next pluralization was removed from the Reaction component. The underlying pluralization logic has already been migrated to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR removes an orphaned/stale TODO comment from the Reaction component in the Meteor client message reactions UI, aligning the file with the current implementation where pluralization is handled by MessageReactionCounter.
Changes:
- Removed the outdated
// TODO: replace it with proper usage of i18next pluralscomment fromReaction.tsx.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes
Removes an orphaned technical debt marker from the Reaction component.
Root Cause / Problem
Line 15 contained a stale
// TODO: replace it with proper usage of i18next pluralscomment traversing the ReactionProps type boundary.```tsx
// BEFORE
const normalizeUsernames = (names: string[]) => names.map(normalizeUsername);
// TODO: replace it with proper usage of i18next plurals
type ReactionProps = {
hasReacted: (name: string) => boolean;
```
Solution / Behavior
Tracing this component reveals that all manual pluralization has already been successfully abstracted away into the globally maintained
@rocket.chat/fuselagecomponent<MessageReactionCounter/>. TheTODOcomment was entirely orphaned dead code. I have safely removed it.```tsx
// AFTER
const normalizeUsernames = (names: string[]) => names.map(normalizeUsername);
type ReactionProps = {
hasReacted: (name: string) => boolean;
```
Issue(s)
Closes #39925
Validation & Testing
yarn lintlocally (0 errors)Type of change
Summary by CodeRabbit