Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Add app icon to web store banner and adjust layout for better visibility

Dev jacob2abc62298d3e
diff --git a/desktop/lib/web/shell/web_store_banner.dart b/desktop/lib/web/shell/web_store_banner.dart
index 780dae2f1..1c0a7d78d 100644
--- a/desktop/lib/web/shell/web_store_banner.dart
+++ b/desktop/lib/web/shell/web_store_banner.dart
@@ -115,6 +115,8 @@ class _WebStoreBar extends StatelessWidget {
final VoidCallback onOpen;
final VoidCallback onDismiss;
+ static const _iconSize = 40.0;
+
@override
Widget build(BuildContext context) {
grid.AppTheme.watch(context);
@@ -140,8 +142,20 @@ class _WebStoreBar extends StatelessWidget {
onPressed: onDismiss,
icon: const Icon(AppIcons.close, size: 16),
color: grid.AppPalette.textSecondary,
+ visualDensity: VisualDensity.compact,
),
),
+ // The app's own icon, as its store page shows it: what makes
+ // this bar read as an app to get, not a line of chrome. The
+ // asset carries its rounded corners, so it is drawn bare.
+ Image.asset(
+ 'assets/app_icon.png',
+ key: const ValueKey('web-store-banner-icon'),
+ width: _iconSize,
+ height: _iconSize,
+ filterQuality: FilterQuality.medium,
+ ),
+ const SizedBox(width: 10),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -153,11 +167,13 @@ class _WebStoreBar extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: AppType.label(
color: grid.AppPalette.textPrimary,
+ fontWeight: FontWeight.w600,
),
),
+ // Wraps on a narrow phone rather than losing its end.
Text(
'Run your fleet from your phone',
- maxLines: 1,
+ maxLines: 2,
overflow: TextOverflow.ellipsis,
style: AppType.caption(
color: grid.AppPalette.textSecondary,
@@ -166,10 +182,15 @@ class _WebStoreBar extends StatelessWidget {
],
),
),
- const SizedBox(width: 12),
+ const SizedBox(width: 8),
FilledButton(
key: const ValueKey('web-store-banner-open'),
onPressed: onOpen,
+ // Narrower than a form's button: the words beside it need
+ // the width on a phone.
+ style: FilledButton.styleFrom(
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ ),
child: const Text('Get the app'),
),
],
diff --git a/desktop/test/web_store_banner_test.dart b/desktop/test/web_store_banner_test.dart
index 14cb0d163..e87ed6d7a 100644
--- a/desktop/test/web_store_banner_test.dart
+++ b/desktop/test/web_store_banner_test.dart
@@ -73,6 +73,13 @@ void main() {
) async {
final opened = await mount(tester, platform, _MemoryStore());
expect(find.byKey(_banner), findsOneWidget);
+ // The app's icon leads its name: the bar reads as an app to get.
+ expect(
+ tester
+ .getRect(find.byKey(const ValueKey('web-store-banner-icon')))
+ .right,
+ lessThan(tester.getRect(find.text('Harness')).left),
+ );
// The bar is above the app, never over it.
expect(
tester.getRect(find.byKey(_banner)).bottom,