Skip to content

Emoji reaction detail views (desktop popover + mobile bottom sheet)#416

Merged
wesbillman merged 6 commits into
mainfrom
emoji-popup
Apr 28, 2026
Merged

Emoji reaction detail views (desktop popover + mobile bottom sheet)#416
wesbillman merged 6 commits into
mainfrom
emoji-popup

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

  • Desktop: Reaction pills now show a Radix Popover on hover with reactor avatars, display names, count, and "click to remove" hint. Hover timers (200ms open, 150ms close grace period) for smooth UX. Keyboard accessible via focus/blur. Works on disabled buttons (archived channels) via span wrapper delegation.
  • Mobile: Long-pressing a reaction pill opens a bottom sheet with emoji filter chips, reactor list with avatars/names/about text, emoji shortcode display, and profile resolution via userCacheProvider.preload(). Shared ReactionRow widget extracted from both channel and thread detail pages.
  • Refactor: Deduplicated SmallAvatar, shortPubkey, formatMessageTime, and thread message actions across mobile pages. Merged identical handleMouseLeave/handleBlur into scheduleClose on desktop.

Follow-up

Test plan

  • flutter analyze — no issues
  • flutter test — 98/98 passing
  • tsc --noEmit — clean
  • biome check — clean
  • Desktop build — successful
  • Rust tests — 165/165 passing
  • Manual: hover reaction pill on desktop → popover shows reactor list with avatars
  • Manual: hover popover on archived channel (disabled button) → popover still appears
  • Manual: tab to reaction pill → popover opens on focus
  • Manual: long-press reaction pill on mobile → bottom sheet with reactor list
  • Manual: multiple reaction types → filter chips work in bottom sheet

🤖 Generated with Claude Code

wesbillman and others added 6 commits April 28, 2026 10:24
Replace plain text Tooltip on reaction pills with a Popover that shows:
- The emoji large at the top with reaction count
- A scrollable list of reactors with avatar + display name (capped at 10)
- "+N more" overflow indicator when > 10 reactors
- "Click to remove your reaction" hint when current user has reacted

The popover opens on hover with a 200ms delay and closes on mouse
leave with a 150ms grace period (so users can move into the popover).
Clicking the pill still toggles the reaction as before.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the plain-text reaction tooltip with a Popover that shows the
emoji, a list of reactor avatars + display names, and a "click to
remove" hint. Hover-open with 200ms delay, smooth transition between
trigger and content. Data was already available in TimelineReaction —
this commit threads avatarUrl through from the profile lookup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract shared ReactionRow widget into reaction_row.dart with:
- onLongPress handler that opens a modal bottom sheet
- Emoji header with shortcode name (e.g., 👀)
- Emoji filter chips when multiple reaction types exist
- Scrollable list of reactors with avatar, display name, and about text
- Profile resolution via userCacheProvider with batch preloading
- Graceful fallback to pubkey prefix when profile is unavailable

Both channel_detail_page.dart and thread_detail_page.dart now use the
shared ReactionRow widget, eliminating the duplicated _ReactionRow
private classes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Wrap button in span so hover/focus fires even when disabled (BLOCK #1)
- Add isNotEmpty/length guards on pubkey indexing in reaction_row (CHANGE #3)
- Add keyboard focus/blur handlers to open popover (CHANGE #4)
- Move useCallback hooks before early return to satisfy rules of hooks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Desktop:
- Merge identical handleMouseLeave/handleBlur into single scheduleClose

Mobile:
- Extract SmallAvatar to shared small_avatar.dart
- Move shortPubkey and formatMessageTime to date_formatters.dart
- Remove duplicated _showThreadMessageActions in favor of shared showMessageActions
- Remove unused import and stale comments

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The ListView in the reaction bottom sheet wasn't accounting for the
device safe area inset, causing content to sit behind the home indicator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-04-28 at 11 02 38 AM Screenshot 2026-04-28 at 11 07 30 AM Screenshot 2026-04-28 at 11 07 32 AM

@wesbillman wesbillman merged commit 8a2562d into main Apr 28, 2026
13 checks passed
@wesbillman wesbillman deleted the emoji-popup branch April 28, 2026 18:17
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.

1 participant