From d01978ab4620550c602c9e74b30bd09c84902144 Mon Sep 17 00:00:00 2001 From: bvandeusen Date: Sun, 1 Mar 2026 13:30:43 -0500 Subject: [PATCH] Fix FAB overlapping send button in wide/tablet master-detail layout In wide mode, the floating action button defaulted to bottom-right of the screen, sitting on top of the chat send button and note detail pane. Replace the FAB with a pinned ListTile at the bottom of the list pane in wide mode (New conversation / New note). The FAB is still used on narrow/phone screens where there is no overlap. Co-Authored-By: Claude Sonnet 4.6 --- .../chat/conversations_list_screen.dart | 24 ++++++++++++++----- lib/screens/notes/notes_list_screen.dart | 24 ++++++++++++++----- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/lib/screens/chat/conversations_list_screen.dart b/lib/screens/chat/conversations_list_screen.dart index 5367c45..c8183ef 100644 --- a/lib/screens/chat/conversations_list_screen.dart +++ b/lib/screens/chat/conversations_list_screen.dart @@ -52,18 +52,30 @@ class _ConversationsListScreenState children: [ SizedBox( width: 300, - child: _buildListPane(convsAsync, isWide), + child: Column( + children: [ + Expanded(child: _buildListPane(convsAsync, isWide)), + const Divider(height: 1), + ListTile( + leading: const Icon(Icons.add), + title: const Text('New conversation'), + onTap: () => _newConversation(isWide), + ), + ], + ), ), const VerticalDivider(width: 1), Expanded(child: _buildDetailPane()), ], ) : _buildListPane(convsAsync, isWide), - floatingActionButton: FloatingActionButton( - heroTag: 'chat_fab', - onPressed: () => _newConversation(isWide), - child: const Icon(Icons.add), - ), + floatingActionButton: isWide + ? null + : FloatingActionButton( + heroTag: 'chat_fab', + onPressed: () => _newConversation(isWide), + child: const Icon(Icons.add), + ), ); } diff --git a/lib/screens/notes/notes_list_screen.dart b/lib/screens/notes/notes_list_screen.dart index 18981e0..34a9652 100644 --- a/lib/screens/notes/notes_list_screen.dart +++ b/lib/screens/notes/notes_list_screen.dart @@ -35,18 +35,30 @@ class _NotesListScreenState extends ConsumerState { children: [ SizedBox( width: 300, - child: _buildListPane(notesAsync, isWide), + child: Column( + children: [ + Expanded(child: _buildListPane(notesAsync, isWide)), + const Divider(height: 1), + ListTile( + leading: const Icon(Icons.add), + title: const Text('New note'), + onTap: () => context.push(Routes.noteNew), + ), + ], + ), ), const VerticalDivider(width: 1), Expanded(child: _buildDetailPane()), ], ) : _buildListPane(notesAsync, isWide), - floatingActionButton: FloatingActionButton( - heroTag: 'notes_fab', - onPressed: () => context.push(Routes.noteNew), - child: const Icon(Icons.add), - ), + floatingActionButton: isWide + ? null + : FloatingActionButton( + heroTag: 'notes_fab', + onPressed: () => context.push(Routes.noteNew), + child: const Icon(Icons.add), + ), ); }