From 44ae66a8f0dd56d16379e390c3323261dfc17b6c Mon Sep 17 00:00:00 2001 From: Wes Date: Mon, 17 Aug 2026 11:17:57 -0600 Subject: [PATCH] Split message reaction tray from popover Keep the message action popover below the mobile file-size ratchet by moving the reaction tray wrapper into its own part file without changing behavior. Co-authored-by: Carl Signed-off-by: Wes --- .../features/channels/message_actions.dart | 1 + .../message_action_popover.dart | 35 ------------------ .../message_reaction_tray.dart | 36 +++++++++++++++++++ 3 files changed, 37 insertions(+), 35 deletions(-) create mode 100644 mobile/lib/features/channels/message_actions/message_reaction_tray.dart diff --git a/mobile/lib/features/channels/message_actions.dart b/mobile/lib/features/channels/message_actions.dart index a2647a256..bd944bd37 100644 --- a/mobile/lib/features/channels/message_actions.dart +++ b/mobile/lib/features/channels/message_actions.dart @@ -41,6 +41,7 @@ import 'timeline_message.dart'; part 'message_actions/reaction_popover.dart'; part 'message_actions/quick_reaction_row.dart'; part 'message_actions/message_action_popover.dart'; +part 'message_actions/message_reaction_tray.dart'; /// Preview length for reminder targets — matches desktop's /// `msg.body.slice(0, 100)`. diff --git a/mobile/lib/features/channels/message_actions/message_action_popover.dart b/mobile/lib/features/channels/message_actions/message_action_popover.dart index 7be77b31b..a6f8d5867 100644 --- a/mobile/lib/features/channels/message_actions/message_action_popover.dart +++ b/mobile/lib/features/channels/message_actions/message_action_popover.dart @@ -810,41 +810,6 @@ class _LiftedMessagePreview extends StatelessWidget { } } -class _MessageReactionTray extends StatelessWidget { - final Animation animation; - final double trayWidth; - final TimelineMessage message; - final BuildContext pageContext; - final WidgetRef pageRef; - final Object popResult; - final void Function(Object? result, VoidCallback effect) onSelected; - - const _MessageReactionTray({ - required this.animation, - required this.trayWidth, - required this.message, - required this.pageContext, - required this.pageRef, - required this.popResult, - required this.onSelected, - }); - - @override - Widget build(BuildContext context) { - return _AnimatedReactionTray( - trayKey: const ValueKey('message-action-reaction-tray'), - animation: animation, - trayWidth: trayWidth, - scaleAlignment: Alignment.bottomLeft, - message: message, - pageContext: pageContext, - pageRef: pageRef, - popResult: popResult, - onSelected: onSelected, - ); - } -} - class _MessageActionSurface extends StatelessWidget { final List<_PopoverMessageAction> actions; final ValueChanged onSelected; diff --git a/mobile/lib/features/channels/message_actions/message_reaction_tray.dart b/mobile/lib/features/channels/message_actions/message_reaction_tray.dart new file mode 100644 index 000000000..212817890 --- /dev/null +++ b/mobile/lib/features/channels/message_actions/message_reaction_tray.dart @@ -0,0 +1,36 @@ +part of '../message_actions.dart'; + +class _MessageReactionTray extends StatelessWidget { + final Animation animation; + final double trayWidth; + final TimelineMessage message; + final BuildContext pageContext; + final WidgetRef pageRef; + final Object popResult; + final void Function(Object? result, VoidCallback effect) onSelected; + + const _MessageReactionTray({ + required this.animation, + required this.trayWidth, + required this.message, + required this.pageContext, + required this.pageRef, + required this.popResult, + required this.onSelected, + }); + + @override + Widget build(BuildContext context) { + return _AnimatedReactionTray( + trayKey: const ValueKey('message-action-reaction-tray'), + animation: animation, + trayWidth: trayWidth, + scaleAlignment: Alignment.bottomLeft, + message: message, + pageContext: pageContext, + pageRef: pageRef, + popResult: popResult, + onSelected: onSelected, + ); + } +}