From 2a7156057452b36a3c6c15d684e222d48ce6cd56 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Thu, 20 Nov 2025 10:10:38 -0500 Subject: [PATCH] chore: move activity goal tooltip outside of chat input bar background color (#4703) --- lib/pages/chat/chat_view.dart | 136 +++++++++--------- .../activity_role_tooltip.dart | 7 +- lib/pangea/chat/widgets/chat_input_bar.dart | 82 ++++++++++- 3 files changed, 147 insertions(+), 78 deletions(-) diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index f0792deb1..f44442636 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -422,84 +422,76 @@ class ChatView extends StatelessWidget { // #Pangea // else if (controller.room.canSendDefaultMessages && // controller.room.membership == Membership.join) + // Container( + // margin: EdgeInsets.all(bottomSheetPadding), + // constraints: const BoxConstraints( + // maxWidth: FluffyThemes.maxTimelineWidth, + // ), + // alignment: Alignment.center, + // child: Material( + // clipBehavior: Clip.hardEdge, + // color: controller.selectedEvents.isNotEmpty + // ? theme.colorScheme.tertiaryContainer + // : theme.colorScheme.surfaceContainerHigh, + // borderRadius: const BorderRadius.all( + // Radius.circular(24), + // ), + // child: controller.room.isAbandonedDMRoom == true + // ? Row( + // mainAxisAlignment: + // MainAxisAlignment.spaceEvenly, + // children: [ + // TextButton.icon( + // style: TextButton.styleFrom( + // padding: const EdgeInsets.all( + // 16, + // ), + // foregroundColor: + // theme.colorScheme.error, + // ), + // icon: const Icon( + // Icons.archive_outlined, + // ), + // onPressed: controller.leaveChat, + // label: Text( + // L10n.of(context).leave, + // ), + // ), + // TextButton.icon( + // style: TextButton.styleFrom( + // padding: const EdgeInsets.all( + // 16, + // ), + // ), + // icon: const Icon( + // Icons.forum_outlined, + // ), + // onPressed: controller.recreateChat, + // label: Text( + // L10n.of(context).reopenChat, + // ), + // ), + // ], + // ) + // : Column( + // mainAxisSize: MainAxisSize.min, + // children: [ + // ReplyDisplay(controller), + // ChatInputRow(controller), + // ChatEmojiPicker(controller), + // ], + // ), + // ), + // ) else if (controller.room.canSendDefaultMessages && controller.room.membership == Membership.join && (controller.room.activityPlan == null || !controller.room.showActivityChatUI || controller.room.isActiveInActivity)) - // Pangea# - Container( - margin: EdgeInsets.all(bottomSheetPadding), - constraints: const BoxConstraints( - maxWidth: FluffyThemes.maxTimelineWidth, - ), - alignment: Alignment.center, - child: Material( - clipBehavior: Clip.hardEdge, - // #Pangea - // color: controller.selectedEvents.isNotEmpty - // ? theme.colorScheme.tertiaryContainer - // : theme.colorScheme.surfaceContainerHigh, - color: theme.colorScheme.surfaceContainerHigh, - // Pangea# - borderRadius: const BorderRadius.all( - Radius.circular(24), - ), - child: controller.room.isAbandonedDMRoom == true - ? Row( - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - TextButton.icon( - style: TextButton.styleFrom( - padding: const EdgeInsets.all( - 16, - ), - foregroundColor: - theme.colorScheme.error, - ), - icon: const Icon( - Icons.archive_outlined, - ), - onPressed: controller.leaveChat, - label: Text( - L10n.of(context).leave, - ), - ), - TextButton.icon( - style: TextButton.styleFrom( - padding: const EdgeInsets.all( - 16, - ), - ), - icon: const Icon( - Icons.forum_outlined, - ), - onPressed: controller.recreateChat, - label: Text( - L10n.of(context).reopenChat, - ), - ), - ], - ) - // #Pangea - // : Column( - // mainAxisSize: MainAxisSize.min, - // children: [ - // ReplyDisplay(controller), - // ChatInputRow(controller), - // ChatEmojiPicker(controller), - // ], - // ), - : ChatInputBar( - controller: controller, - padding: bottomSheetPadding, - ), - - // Pangea# - ), + ChatInputBar( + controller: controller, + padding: bottomSheetPadding, ) - // #Pangea else if (controller.room.activityPlan != null && controller.room.showActivityChatUI && !controller.room.isActiveInActivity) diff --git a/lib/pangea/activity_sessions/activity_session_chat/activity_role_tooltip.dart b/lib/pangea/activity_sessions/activity_session_chat/activity_role_tooltip.dart index 3b2459e41..18e1819f2 100644 --- a/lib/pangea/activity_sessions/activity_session_chat/activity_role_tooltip.dart +++ b/lib/pangea/activity_sessions/activity_session_chat/activity_role_tooltip.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:matrix/matrix.dart'; +import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/pangea/activity_sessions/activity_room_extension.dart'; import 'package:fluffychat/pangea/instructions/instructions_inline_tooltip.dart'; @@ -30,7 +31,11 @@ class ActivityRoleTooltip extends StatelessWidget { onClose: () async { await room.dismissGoalTooltip(); }, - padding: const EdgeInsets.all(16.0), + padding: EdgeInsets.only( + left: 16.0, + right: 16.0, + top: FluffyThemes.isColumnMode(context) ? 16.0 : 8.0, + ), ); }, ); diff --git a/lib/pangea/chat/widgets/chat_input_bar.dart b/lib/pangea/chat/widgets/chat_input_bar.dart index c691f01d0..72c3d4160 100644 --- a/lib/pangea/chat/widgets/chat_input_bar.dart +++ b/lib/pangea/chat/widgets/chat_input_bar.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; +import 'package:fluffychat/config/themes.dart'; +import 'package:fluffychat/l10n/l10n.dart'; import 'package:fluffychat/pages/chat/chat.dart'; import 'package:fluffychat/pages/chat/chat_emoji_picker.dart'; import 'package:fluffychat/pages/chat/reply_display.dart'; @@ -19,6 +21,7 @@ class ChatInputBar extends StatelessWidget { @override Widget build(BuildContext context) { + final theme = Theme.of(context); return Column( mainAxisSize: MainAxisSize.min, children: [ @@ -26,12 +29,81 @@ class ChatInputBar extends StatelessWidget { room: controller.room, hide: controller.choreographer.itController.open, ), - ITBar(choreographer: controller.choreographer), - ReplyDisplay(controller), - PangeaChatInputRow( - controller: controller, + Container( + margin: EdgeInsets.all( + FluffyThemes.isColumnMode(context) ? 16.0 : 8.0, + ), + constraints: const BoxConstraints( + maxWidth: FluffyThemes.maxTimelineWidth, + ), + alignment: Alignment.center, + child: Material( + clipBehavior: Clip.hardEdge, + color: theme.colorScheme.surfaceContainerHigh, + borderRadius: const BorderRadius.all( + Radius.circular(24), + ), + child: controller.room.isAbandonedDMRoom == true + ? _AbandonedDMContent(controller: controller) + : Column( + mainAxisSize: MainAxisSize.min, + children: [ + ITBar(choreographer: controller.choreographer), + ReplyDisplay(controller), + PangeaChatInputRow( + controller: controller, + ), + ChatEmojiPicker(controller), + ], + ), + ), + ), + ], + ); + } +} + +class _AbandonedDMContent extends StatelessWidget { + final ChatController controller; + + const _AbandonedDMContent({ + required this.controller, + }); + + @override + Widget build(BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + TextButton.icon( + style: TextButton.styleFrom( + padding: const EdgeInsets.all( + 16, + ), + foregroundColor: Theme.of(context).colorScheme.error, + ), + icon: const Icon( + Icons.archive_outlined, + ), + onPressed: controller.leaveChat, + label: Text( + L10n.of(context).leave, + ), + ), + TextButton.icon( + style: TextButton.styleFrom( + padding: const EdgeInsets.all( + 16, + ), + ), + icon: const Icon( + Icons.forum_outlined, + ), + onPressed: controller.recreateChat, + label: Text( + L10n.of(context).reopenChat, + ), ), - ChatEmojiPicker(controller), ], ); }