Skip to content

Commit 75a4efd

Browse files
authored
fix(mobile): unify sheet sections and bottom spacing (#8081)
## Summary Use rounded, grouped rows consistently across mobile sheets and menus, including Members and list pickers. Keep sheet content above the system gesture area with 4dp of extra bottom padding on Android and iOS. ### Related issue No duplicate found; related member-picker work: #4051. ### Testing - Mobile analysis, formatting, file-size checks, and full mobile test suite pass. - Android build installed and launched on Pixel 10. - Before/after Members previews use sample data (attached below). - Full `just ci` stopped during Rust compilation because local disk space ran out. Signed-off-by: kenny lopez <[email protected]>
1 parent 03f24a6 commit 75a4efd

24 files changed

Lines changed: 814 additions & 563 deletions

‎mobile/lib/features/activity/activity_page.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import '../../shared/mentions/mention_tags.dart';
1313
import '../../shared/relay/relay.dart';
1414
import '../../shared/theme/theme.dart';
1515
import '../../shared/utils/string_utils.dart';
16+
import '../../shared/widgets/sheet_action_section.dart';
1617
import '../../shared/widgets/avatar_image.dart';
1718
import '../../shared/widgets/anchored_popover_menu.dart';
1819
import '../../shared/widgets/bee_refresh_indicator.dart';

‎mobile/lib/features/activity/activity_page/inbox_row.dart‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,7 @@ class _InboxRow extends HookConsumerWidget {
383383
),
384384
child: IconTheme.merge(
385385
data: const IconThemeData(size: 18),
386-
child: Column(
387-
mainAxisSize: MainAxisSize.min,
386+
child: SheetActionSection(
388387
children: [
389388
ListTile(
390389
leading: Icon(

‎mobile/lib/features/channels/add_members_sheet.dart‎

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
66
import 'package:lucide_icons_flutter/lucide_icons.dart';
77

88
import '../../shared/theme/theme.dart';
9+
import '../../shared/widgets/app_list_card_item.dart';
910
import '../../shared/widgets/avatar_image.dart';
1011
import '../../shared/widgets/buzz_loading_indicator.dart';
1112
import '../../shared/identity_names/identity_names_provider.dart';
@@ -199,44 +200,48 @@ class AddChannelMembersSheet extends HookConsumerWidget {
199200
final selected = selectedPubkeys.contains(
200201
user.pubkey.toLowerCase(),
201202
);
202-
return Semantics(
203-
key: ValueKey(
204-
'add-channel-member-${user.pubkey}',
205-
),
206-
button: true,
207-
selected: selected,
208-
label: selected
209-
? '${labelFor(user)}, selected'
210-
: labelFor(user),
211-
child: ListTile(
212-
contentPadding: EdgeInsets.zero,
213-
leading: AvatarImage(
214-
imageUrl: user.avatarUrl,
215-
radius: 20,
216-
backgroundColor:
217-
context.colors.primaryContainer,
218-
fallback: Text(user.initial),
219-
isAgent: user.isAgent,
220-
),
221-
title: Text(
222-
labelFor(user),
223-
maxLines: 1,
224-
overflow: TextOverflow.ellipsis,
225-
),
226-
subtitle: Text(
227-
user.secondaryLabel,
228-
maxLines: 1,
229-
overflow: TextOverflow.ellipsis,
203+
return AppListCardItem(
204+
index: index,
205+
itemCount: availableUsers.length,
206+
dividerIndent: Grid.xs + 40 + Grid.xs,
207+
child: Semantics(
208+
key: ValueKey(
209+
'add-channel-member-${user.pubkey}',
230210
),
231-
trailing: Icon(
232-
selected
233-
? LucideIcons.circleCheck
234-
: LucideIcons.plus,
235-
color: selected
236-
? context.colors.primary
237-
: context.colors.onSurfaceVariant,
211+
button: true,
212+
selected: selected,
213+
label: selected
214+
? '${labelFor(user)}, selected'
215+
: labelFor(user),
216+
child: ListTile(
217+
leading: AvatarImage(
218+
imageUrl: user.avatarUrl,
219+
radius: 20,
220+
backgroundColor:
221+
context.colors.primaryContainer,
222+
fallback: Text(user.initial),
223+
isAgent: user.isAgent,
224+
),
225+
title: Text(
226+
labelFor(user),
227+
maxLines: 1,
228+
overflow: TextOverflow.ellipsis,
229+
),
230+
subtitle: Text(
231+
user.secondaryLabel,
232+
maxLines: 1,
233+
overflow: TextOverflow.ellipsis,
234+
),
235+
trailing: Icon(
236+
selected
237+
? LucideIcons.circleCheck
238+
: LucideIcons.plus,
239+
color: selected
240+
? context.colors.primary
241+
: context.colors.onSurfaceVariant,
242+
),
243+
onTap: () => toggleUser(user),
238244
),
239-
onTap: () => toggleUser(user),
240245
),
241246
);
242247
},

0 commit comments

Comments
 (0)