From 8647d3f3f96361e0ab6ab2ff003fb11fffab1617 Mon Sep 17 00:00:00 2001 From: Tom Brow Date: Mon, 19 Oct 2026 18:08:21 -0700 Subject: [PATCH] Balance spacing around remote agent profile actions Signed-off-by: Tom Brow --- mobile/lib/features/profile/user_profile_sheet.dart | 12 ++++++++++-- mobile/lib/prototype/agents_sheet.dart | 2 ++ mobile/lib/prototype/delete_agent_action.dart | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mobile/lib/features/profile/user_profile_sheet.dart b/mobile/lib/features/profile/user_profile_sheet.dart index d458ffb800..4706452e54 100644 --- a/mobile/lib/features/profile/user_profile_sheet.dart +++ b/mobile/lib/features/profile/user_profile_sheet.dart @@ -66,11 +66,19 @@ class UserProfileSheet extends HookConsumerWidget { /// Optional actions supplied by the opening surface, below the profile tiles. final WidgetBuilder? contextualActions; + /// Space before the primary profile actions. + final double primaryActionsSpacing; + + /// Space between primary actions and caller-supplied actions. + final double contextualActionsSpacing; + const UserProfileSheet({ super.key, required this.pubkey, this.names, this.contextualActions, + this.primaryActionsSpacing = Grid.xs + Grid.half, + this.contextualActionsSpacing = Grid.xs, }); @override @@ -264,7 +272,7 @@ class UserProfileSheet extends HookConsumerWidget { ), ], - const SizedBox(height: Grid.xs + Grid.half), + SizedBox(height: primaryActionsSpacing), Row( children: [ @@ -296,7 +304,7 @@ class UserProfileSheet extends HookConsumerWidget { ), ], ), - const SizedBox(height: Grid.xs), + SizedBox(height: contextualActionsSpacing), if (contextualActions != null) Builder(builder: contextualActions!), ], diff --git a/mobile/lib/prototype/agents_sheet.dart b/mobile/lib/prototype/agents_sheet.dart index cd814d193f..4a2d517c4b 100644 --- a/mobile/lib/prototype/agents_sheet.dart +++ b/mobile/lib/prototype/agents_sheet.dart @@ -84,6 +84,8 @@ class _AgentsNavigation extends HookConsumerWidget { ), child: UserProfileSheet( pubkey: pubkey, + primaryActionsSpacing: Grid.md, + contextualActionsSpacing: Grid.xxs, contextualActions: (_) => DeleteAgentAction( controller: controller, pubkey: pubkey, diff --git a/mobile/lib/prototype/delete_agent_action.dart b/mobile/lib/prototype/delete_agent_action.dart index 84f53d9dc4..7acbc98887 100644 --- a/mobile/lib/prototype/delete_agent_action.dart +++ b/mobile/lib/prototype/delete_agent_action.dart @@ -82,7 +82,7 @@ class DeleteAgentAction extends HookConsumerWidget { } return Padding( - padding: const EdgeInsets.only(top: Grid.xs), + padding: EdgeInsets.zero, child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [