fix(mobile): simplify and refine the quick actions menu (#8491)

Keeps the mobile + menu focused on Create channel and New direct
message, with 8-point facing corners, a 6-point gap, and the active
Home/Solo tab fill on iOS.

Moves Browse channels directly above the channel list, including its
empty state, preserving open-channel discovery, retry, and Join. Adds a
cold-start journey through the real channel loader and join action with
relay boundaries faked.

Validation: mobile formatting/analysis and full mobile test suite;
mutation check confirms the new journey fails when directory loading is
removed. The original menu styling was tried on a physical iPhone; the
replacement Browse entry has widget-journey coverage and has not yet
been tried on device.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
This commit is contained in:
klopez4212
2026-10-20 17:38:29 -04:00
committed by GitHub
parent a5767c67de
commit ca35114209
7 changed files with 354 additions and 171 deletions

View File

@@ -2,6 +2,7 @@ import 'channel_unread.dart';
import '../../shared/widgets/collapsible_section_body.dart';
import '../../shared/widgets/compose_morph_icon.dart';
import '../../shared/me/me_sync.dart';
import 'dart:async';
import 'dart:io';
import 'dart:math' show max, min, pi;
@@ -77,7 +78,7 @@ part 'channels_page/quick_actions.dart';
part 'channels_page/quick_actions_launcher.dart';
part 'channels_page/header_actions.dart';
enum _QuickAction { createChannel, newDm, browseChannels }
enum _QuickAction { createChannel, newDm }
const double _kChannelSectionInset = Grid.gutter;
const double _kChannelLeadingWidth = 22.0;

View File

@@ -254,6 +254,25 @@ class _SliverChannelsList extends HookConsumerWidget {
),
sliver: SliverList.list(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: Grid.gutter),
child: Align(
alignment: Alignment.centerLeft,
child: TextButton.icon(
key: const Key('browse-channels-button'),
icon: const Icon(BuzzIcons.compass),
label: const Text('Browse channels'),
onPressed: () => showBuzzModalBottomSheet<void>(
context: context,
title: 'Browse channels',
constraints: _quickActionSheetConstraints(context),
isScrollControlled: true,
showDragHandle: true,
builder: (_) => const _BrowseChannelsSheet(),
),
),
),
),
if (visibleChannels.isEmpty)
const _EmptyState()
else ...[

View File

@@ -7,7 +7,7 @@ const _kMorphCloseCurve = Cubic(0.22, 1, 0.36, 1);
const double _kMorphOpenBounce = 0.14;
const double _kMorphCloseBounce = 0.06;
const double _kMorphClosedSize = 56;
const double _kMorphOpenHeight = 216;
const double _kMorphOpenHeight = 142;
const double _kMorphOpenRadius = mobileTabBarHeight / 2;
const double _kMorphSlide = 40;
const double _kMorphScale = 0.97;
@@ -300,23 +300,24 @@ class _QuickActionsMenu extends StatelessWidget {
_QuickActionItem(
icon: BuzzIcons.hash,
title: 'Create channel',
borderRadius: const BorderRadius.vertical(
top: Radius.circular(_kQuickActionCardRadius),
bottom: Radius.circular(8),
),
key: const Key('quick-action-create-channel-card'),
onTap: () => onSelected(_QuickAction.createChannel),
),
const SizedBox(height: Grid.xxs),
const SizedBox(height: Grid.xxs - 2),
_QuickActionItem(
icon: BuzzIcons.messagesSquare,
title: 'New direct message',
borderRadius: const BorderRadius.vertical(
top: Radius.circular(8),
bottom: Radius.circular(_kQuickActionCardRadius),
),
key: const Key('quick-action-new-dm-card'),
onTap: () => onSelected(_QuickAction.newDm),
),
const SizedBox(height: Grid.xxs),
_QuickActionItem(
icon: BuzzIcons.compass,
title: 'Browse channels',
key: const Key('quick-action-browse-channels-card'),
onTap: () => onSelected(_QuickAction.browseChannels),
),
],
),
);
@@ -327,12 +328,14 @@ class _QuickActionItem extends StatelessWidget {
final IconData icon;
final String title;
final VoidCallback onTap;
final BorderRadius borderRadius;
const _QuickActionItem({
super.key,
required this.icon,
required this.title,
required this.onTap,
required this.borderRadius,
});
@override
@@ -340,7 +343,10 @@ class _QuickActionItem extends StatelessWidget {
final isIos = defaultTargetPlatform == TargetPlatform.iOS;
final foreground = isIos ? context.colors.onSurface : Colors.white;
final background = isIos
? context.controlSurface
? Color.alphaBlend(
Colors.black.withValues(alpha: 0.05),
context.controlSurface,
)
: Color.alphaBlend(
Colors.white.withValues(alpha: 0.1),
const Color(0xFF262626),
@@ -349,9 +355,7 @@ class _QuickActionItem extends StatelessWidget {
return Expanded(
child: Material(
color: background,
shape: RoundedSuperellipseBorder(
borderRadius: BorderRadius.circular(_kQuickActionCardRadius),
),
shape: RoundedSuperellipseBorder(borderRadius: borderRadius),
clipBehavior: Clip.antiAlias,
child: InkWell(
onTap: onTap,

View File

@@ -121,15 +121,6 @@ class ChannelQuickActionsLauncher extends HookConsumerWidget {
if (opened != null && context.mounted) {
await openChannel(opened);
}
case _QuickAction.browseChannels:
await showBuzzModalBottomSheet<void>(
context: context,
title: 'Browse channels',
constraints: _quickActionSheetConstraints(context),
isScrollControlled: true,
showDragHandle: true,
builder: (_) => const _BrowseChannelsSheet(),
);
}
}