Skip to content

Mobile: add anchored reaction popover - #5025

Open
klopez4212 wants to merge 2 commits into
mainfrom
kennylopez-mobile-reaction-popover
Open

Mobile: add anchored reaction popover#5025
klopez4212 wants to merge 2 commits into
mainfrom
kennylopez-mobile-reaction-popover

Conversation

@klopez4212

Copy link
Copy Markdown
Contributor

Summary

  • replace reaction-only mobile sheets with an anchored long-press popover
  • add haptics, a dimmed frosted spotlight, and a spring-staggered reaction tray
  • preserve the full action sheet whenever other message actions are available
  • keep existing reaction pills outside the spotlight and make long press reliable across nested content

Testing

  • flutter analyze
  • flutter test (1,248 tests)
  • signed iPhone release build installed and launched

Signed-off-by: kenny lopez <klopez4212@gmail.com>
klopez4212 added a commit that referenced this pull request Aug 6, 2026
@klopez4212

Copy link
Copy Markdown
Contributor Author

🤖

Emoji-only action

A reaction-only system event opens the anchored frosted popover.

01-emoji-only-popover

Full action sheet fallback

A regular message keeps the existing sheet when more actions are available.

02-action-sheet-fallback

Signed-off-by: kenny lopez <klopez4212@gmail.com>
@klopez4212
klopez4212 marked this pull request as ready for review August 6, 2026 11:54
@klopez4212
klopez4212 requested a review from a team as a code owner August 6, 2026 11:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fca0644798

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +84 to +85
GestureBinding.instance.cancelPointer(pointer);
recognize();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Let descendant long presses win

When a user holds an existing reaction pill, its own GestureDetector invokes showReactionDetailSheet (reaction_row.dart:131), but this independent timer can also reach recognize() because it does not participate in the gesture arena. At the shared long-press deadline the child may already have accepted before cancelPointer runs, causing both modal routes to be pushed and the message reaction picker to cover the reactor-detail sheet. Use a gesture-arena-aware recognizer or otherwise suppress the parent callback when a descendant handles the long press.

Useful? React with 👍 / 👎.

/// Links, media, reactions, and other nested controls keep their normal tap
/// gestures. Moving far enough to scroll cancels the timer; recognizing the
/// hold cancels the pointer so a descendant tap cannot fire on release.
class MessageLongPressRegion extends HookWidget {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep only one public widget in this file

This file introduces both MessageLongPressInkWell and MessageLongPressRegion as public widgets, contrary to the mobile convention requiring one public widget per file. Make the implementation widget private or move it to a sibling file so the public surface remains composable and file ownership stays unambiguous.

AGENTS.md reference: AGENTS.md:L545-L547

Useful? React with 👍 / 👎.

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