mirror of
https://github.com/block/buzz.git
synced 2026-11-06 09:21:45 +00:00
mobile: make the first-agent card stand out in dark mode (#9171)
Follow-up to #9036. In dark mode the "Create your first agent" card used the raised dark surface (#1A1A1A), which barely separates from the black Home page, and dark mode shows no shadow — feedback was that it's hard to see. The card now uses the inverse surface in both themes (light: dark card on white; dark: light gray card with black text), so it always contrasts the page. No new tokens. Tests: `flutter analyze` on the widget; `flutter test test/shared/widgets/buzz_callout_test.dart test/features/channels/` all pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) | | Before | After | |---|---|---| | Dark |  |  | | Light (unchanged) |  |  | _Rendered from the widget at phone width with the real fonts and artwork._ Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com> Co-authored-by: Morgarita <6e967af659416160ab4f2fd56d74c8c6f273791ee7bfc9468a1be37c387947be@buzz.block.builderlab.xyz> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,7 @@ class BuzzCallout extends HookWidget {
|
||||
right: padding.right + Grid.xs,
|
||||
top: padding.top + Grid.xs,
|
||||
),
|
||||
color: _calloutColors(context).$1,
|
||||
color: context.colors.inverseSurface,
|
||||
shadowColor: appPopoverShadowColor(context),
|
||||
child: _Card(
|
||||
message: message,
|
||||
@@ -127,16 +127,6 @@ class BuzzCallout extends HookWidget {
|
||||
}
|
||||
}
|
||||
|
||||
/// The callout's background and foreground. Inverse colors set it apart from
|
||||
/// menus and the page; in dark mode, whose inverse is a flat light gray, it
|
||||
/// uses the raised dark surface instead, as toasts do.
|
||||
(Color, Color) _calloutColors(BuildContext context) {
|
||||
final colors = context.colors;
|
||||
return Theme.of(context).brightness == Brightness.dark
|
||||
? (colors.surfaceContainer, colors.onSurface)
|
||||
: (colors.inverseSurface, colors.onInverseSurface);
|
||||
}
|
||||
|
||||
/// Where the card's artwork sits, after desktop's empty Agents tile: each
|
||||
/// picture hangs partly off an edge, tilted, clear of the close button. The
|
||||
/// message sits on top where they meet.
|
||||
@@ -211,7 +201,7 @@ class _Card extends StatelessWidget {
|
||||
message,
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleLarge?.copyWith(
|
||||
color: _calloutColors(context).$2,
|
||||
color: context.colors.onInverseSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -223,7 +213,7 @@ class _Card extends StatelessWidget {
|
||||
child: IconButton(
|
||||
tooltip: 'Dismiss',
|
||||
onPressed: onDismiss,
|
||||
color: _calloutColors(context).$2,
|
||||
color: context.colors.onInverseSurface,
|
||||
icon: const Icon(BuzzIcons.x),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user