feat(messaging): emoji reactions with custom-emoji image resolution#111
Conversation
Adds reaction pills, a reaction picker, and a reactors dialog to message rows, and resolves custom-emoji reaction images from the space's emoji catalog (falling back to the bare CDN path) so animated/custom emoji render correctly. Also fixes channel-mute detection to read channel_id from the structured mutes list. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The reaction & mute work landed both in accord_home_message_row.dart and in the dedicated part files (accord_home_mute_button.dart / accord_home_reactions.dart) that refactor #108 had already extracted, producing duplicate_definition compile errors. Remove the stale copies from accord_home_message_row.dart and port the two bug fixes into the canonical part files: - mute-state read: parse channel_id out of the listMutes objects instead of stringifying the whole map (was always falsey, so muted state never showed). - custom-emoji reactions: resolve the image URL from the space emoji catalog (image_url with space segment + real extension) rather than the bare AccordCDN.emoji(id) path, which 404'd. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Pushed a follow-up commit ( Build fix — duplicate definitions. The reaction/mute widgets were defined both in Bug fixes ported into the canonical files:
|
… add tests The PR added _ReactButton, _ReactionPill, _ReactorsDialog, _MuteButton, and _NotifAction to accord_home_message_row.dart, but identical/older definitions of the first three already existed in accord_home_reactions.dart (same `part of` library → compile-time duplicate class error). - Move all reaction/notification widgets to accord_home_reactions.dart (their natural home); remove duplicates from accord_home_message_row.dart. - Update _ReactionPill in accord_home_reactions.dart to use the new `imageUrl` parameter (was `cdnUrl`) matching the improved PR design. - Extract _ReactorTile to eliminate the double accordAvatarUrl() call per user. - Fix wrong docstring on _MuteButton (previously read "Opens the full emoji picker to add a reaction to the message"). - Remove redundant `final emojiUrl = imageUrl;` alias in _ReactionPill.build(). - Wrap long _reactionEmojiUrl line to stay within 80 cols. - Add test/features/messaging/emoji_utils_test.dart covering parseEmojiToken, resolveEmojiGlyph, and the mute-list channel_id extraction logic. https://claude.ai/code/session_01MVhELbGUNvFDcBX2MkRs8r
Review findings and fixes (commit
|
…part The mute-button widgets were accidentally appended to accord_home_reactions.dart, duplicating the definitions already in accord_home_mute_button.dart and failing analyze with duplicate_definition. Keep only the canonical copies. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
_ReactButton,_ReactionPill,_ReactorsDialog).image_url), falling back to the bare CDN path, so animated/custom emoji render correctly. Unicode reactions render without an image.emoji.imageUrland uses thegif/pngformat based onemoji.animated.channel_idfrom the structured mutes list rather than stringifying whole entries.Why
Reaction rendering previously used a bare CDN emoji URL that didn't account for custom/animated emoji or the space path segment, so custom reactions wouldn't display. This wires reactions through the space emoji catalog for correct images.
Notes for reviewers
flutter analyze --no-fatal-infosis clean on all four changed files._MuteButtonis defined inaccord_home_message_row.dartbut appears unused — flagging in case it should be wired up or removed in a follow-up.Test plan
🤖 Generated with Claude Code