mirror of
https://github.com/block/buzz.git
synced 2026-11-08 18:31:56 +00:00
## Summary Preview buzz-app's Tabler icon style in the mobile app, replacing app-drawn Lucide glyphs across channels, messages, activity, search, and settings. A shared `BuzzIcons` mapping uses the bundled Tabler 3.46.0 outline font, matching buzz-app's version, with its MIT license and source documented. Native UIKit controls retain SF Symbols. The former 300/500 navigation glyphs use Tabler's standard outline; existing selection colors and labels remain. ### Related issue No matching Tabler mobile migration issue or PR found. Related native iOS controls: #8055. ### Testing - Pre-push mobile analysis, formatting, file-size checks, and the full mobile test suite passed. - 194 focused widget tests passed, including channels, home, search, settings, and message content. - Light and dark community-settings renders inspected. - Signed iPhone Release build succeeded; installed and launched as Buzz Tabler on a physical iPhone. - Full `just ci` attempted; stopped during Rust clippy compilation because the Mac ran low on disk space. Full repository validation is not claimed. Signed-off-by: kenny lopez <klopez4212@gmail.com>
91 lines
2.2 KiB
Dart
91 lines
2.2 KiB
Dart
part of '../compose_bar.dart';
|
|
|
|
class _FormattingToolbar extends StatelessWidget {
|
|
final void Function(String prefix, [String? suffix]) onFormat;
|
|
|
|
const _FormattingToolbar({required this.onFormat});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
key: const ValueKey('formatting-actions'),
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
_FormatButton(
|
|
icon: BuzzIcons.bold,
|
|
tooltip: 'Bold',
|
|
onTap: () => onFormat('**'),
|
|
),
|
|
_FormatButton(
|
|
icon: BuzzIcons.italic,
|
|
tooltip: 'Italic',
|
|
onTap: () => onFormat('_'),
|
|
),
|
|
_FormatButton(
|
|
icon: BuzzIcons.strikethrough,
|
|
tooltip: 'Strikethrough',
|
|
onTap: () => onFormat('~~'),
|
|
),
|
|
_FormatButton(
|
|
icon: BuzzIcons.code,
|
|
tooltip: 'Code',
|
|
onTap: () => onFormat('`'),
|
|
),
|
|
_FormatButton(
|
|
icon: BuzzIcons.squareCode,
|
|
tooltip: 'Code block',
|
|
onTap: () => onFormat('```\n', '\n```'),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|
|
class _FormatButton extends StatelessWidget {
|
|
final IconData icon;
|
|
final String tooltip;
|
|
final VoidCallback onTap;
|
|
|
|
const _FormatButton({
|
|
required this.icon,
|
|
required this.tooltip,
|
|
required this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Tooltip(
|
|
message: tooltip,
|
|
child: InkWell(
|
|
borderRadius: BorderRadius.circular(Radii.sm),
|
|
onTap: () => _runComposerAction(onTap),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(Grid.xxs),
|
|
child: Icon(icon, size: 18, color: context.colors.primary),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class _ComposeAction extends StatelessWidget {
|
|
final IconData icon;
|
|
final VoidCallback onTap;
|
|
|
|
const _ComposeAction({required this.icon, required this.onTap});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: 36,
|
|
height: 36,
|
|
child: IconButton(
|
|
onPressed: () => _runComposerAction(onTap),
|
|
icon: Icon(icon, size: 20, color: context.colors.onSurfaceVariant),
|
|
padding: EdgeInsets.zero,
|
|
visualDensity: VisualDensity.compact,
|
|
),
|
|
);
|
|
}
|
|
}
|