Add native-style mobile action menus - #5402
Conversation
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e298fcbb25
ℹ️ 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".
| snapshot.dispose(); | ||
| if (context.mounted) onPopoverDismissed?.call(); |
There was a problem hiding this comment.
Retain the snapshot through the reverse transition
With animations enabled, the future returned by showGeneralDialog completes when Navigator.pop starts, while _MessageActionsPopover remains mounted and paints during the 240 ms reverse transition. Disposing snapshot here—and restoring the hidden source in the next line—can make those remaining frames render a disposed image or show both copies of the message. Defer disposal and onPopoverDismissed until the route unmounts or reaches AnimationStatus.dismissed, as the new Activity popover already does; the reaction-only iOS and Android paths contain the same lifecycle error.
Useful? React with 👍 / 👎.
| final safeTop = mediaQuery.padding.top + Grid.xxs; | ||
| final safeBottom = | ||
| constraints.maxHeight - mediaQuery.padding.bottom - Grid.xxs; |
There was a problem hiding this comment.
Keep the action menu above the keyboard
When the composer keyboard remains open and the user long-presses a visible message, this layout treats the obscured keyboard area as available because safeBottom subtracts only system padding. The combined tray, preview, and action surface are therefore centered partly behind the keyboard, which can hide lower actions and make them untappable. Account for mediaQuery.viewInsets.bottom (and the top inset) here, as _MessageReactionPopover already does.
Useful? React with 👍 / 👎.
Summary
Why
Message and Activity actions previously relied on sheets or disconnected menus. This gives both platforms a compact, contextual presentation while preserving existing action and reaction behavior.
Validation
just mobile-checkRunnerTestssuite (29 tests)