mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
## Summary
- Refine the mobile composer with compact and expanded states, shared
footer fades, haptics, reliable keyboard dismissal, and full-width
camera and photo surfaces.
- Standardize popovers, filters, and section menus with consistent type,
strokes, radii, spacing, icons, and destructive styling.
- Align message presentation with desktop through consistent system
rows, typing and loading feedback, emoji placement, and predictable
photo viewing.
## Validation
- `just mobile-check`
- `just mobile-test` — 1,037 passed, 1 skipped
- Tested on Pixel 10 and a connected iPhone
## Snapshots
<table>
<tr>
<td align="center">Compact composer</td>
<td align="center">Attachment menu</td>
<td align="center">Recent photos</td>
</tr>
<tr>
<td><img
src="https://raw.githubusercontent.com/block/buzz/9732022cb13bb39ce797c4faaa714fe4c924955f/pr-3918--01-compact-composer.png"
width="260" /></td>
<td><img
src="https://raw.githubusercontent.com/block/buzz/9732022cb13bb39ce797c4faaa714fe4c924955f/pr-3918--02-attachment-menu.png"
width="260" /></td>
<td><img
src="https://raw.githubusercontent.com/block/buzz/9732022cb13bb39ce797c4faaa714fe4c924955f/pr-3918--03-photo-surface.png"
width="260" /></td>
</tr>
</table>
---------
Signed-off-by: kenny lopez <klopez4212@gmail.com>
50 lines
1.2 KiB
Dart
50 lines
1.2 KiB
Dart
part of '../compose_bar.dart';
|
|
|
|
class _SendButton extends StatelessWidget {
|
|
final bool isSending;
|
|
final bool isDisabled;
|
|
final VoidCallback onTap;
|
|
|
|
const _SendButton({
|
|
required this.isSending,
|
|
required this.onTap,
|
|
this.isDisabled = false,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: 36,
|
|
height: 36,
|
|
child: IconButton(
|
|
onPressed: (isSending || isDisabled)
|
|
? null
|
|
: () => _runComposerAction(onTap),
|
|
style: IconButton.styleFrom(
|
|
backgroundColor: context.colors.primary,
|
|
disabledBackgroundColor: context.colors.primary.withValues(
|
|
alpha: 0.5,
|
|
),
|
|
shape: const CircleBorder(),
|
|
),
|
|
padding: EdgeInsets.zero,
|
|
icon: isSending
|
|
? BuzzLoadingIndicator(
|
|
size: 18,
|
|
color: context.colors.onPrimary,
|
|
semanticLabel: 'Sending message',
|
|
)
|
|
: Icon(
|
|
LucideIcons.arrowUp,
|
|
size: 18,
|
|
color: context.colors.onPrimary,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
String _formatUploadError(Object error) {
|
|
return error.toString().replaceFirst('Exception: ', '');
|
|
}
|