Balance spacing around remote agent profile actions

Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
Tom Brow
2026-10-19 18:08:21 -07:00
parent 1fbef0b349
commit 8647d3f3f9
3 changed files with 13 additions and 3 deletions

View File

@@ -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!),
],

View File

@@ -84,6 +84,8 @@ class _AgentsNavigation extends HookConsumerWidget {
),
child: UserProfileSheet(
pubkey: pubkey,
primaryActionsSpacing: Grid.md,
contextualActionsSpacing: Grid.xxs,
contextualActions: (_) => DeleteAgentAction(
controller: controller,
pubkey: pubkey,

View File

@@ -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: [