diff --git a/apps/app_seeds/lib/ui/variety_detail_screen.dart b/apps/app_seeds/lib/ui/variety_detail_screen.dart index 2442092..f34df29 100644 --- a/apps/app_seeds/lib/ui/variety_detail_screen.dart +++ b/apps/app_seeds/lib/ui/variety_detail_screen.dart @@ -448,14 +448,15 @@ Future _showGerminationSheet( top: 16, bottom: MediaQuery.of(sheetContext).viewInsets.bottom + 16, ), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - t.germination.title, - style: Theme.of(sheetContext).textTheme.titleLarge, - ), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + t.germination.title, + style: Theme.of(sheetContext).textTheme.titleLarge, + ), const SizedBox(height: 8), if (lot.germinationTests.isEmpty) Text(t.germination.none) @@ -530,6 +531,7 @@ Future _showGerminationSheet( ), ], ), + ), ), ); } @@ -1175,14 +1177,15 @@ Future _showConditionSheet( top: 16, bottom: MediaQuery.of(sheetContext).viewInsets.bottom + 16, ), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Text( - t.conditionCheck.title, - style: Theme.of(sheetContext).textTheme.titleLarge, - ), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + t.conditionCheck.title, + style: Theme.of(sheetContext).textTheme.titleLarge, + ), const SizedBox(height: 12), TextField( key: const Key('conditionCheck.containers'), @@ -1239,6 +1242,7 @@ Future _showConditionSheet( ), ], ), + ), ), ), ); diff --git a/apps/app_seeds/test/ui/small_screen_overflow_test.dart b/apps/app_seeds/test/ui/small_screen_overflow_test.dart index 41be17a..a2f9217 100644 --- a/apps/app_seeds/test/ui/small_screen_overflow_test.dart +++ b/apps/app_seeds/test/ui/small_screen_overflow_test.dart @@ -10,9 +10,11 @@ import 'package:tane/services/social_connection.dart'; import 'package:tane/services/social_service.dart'; import 'package:tane/services/social_settings.dart'; import 'package:tane/ui/about_screen.dart'; +import 'package:tane/ui/chat_screen.dart'; import 'package:tane/ui/home_screen.dart'; import 'package:tane/ui/intro_screen.dart'; import 'package:tane/ui/inventory_list_screen.dart'; +import 'package:tane/ui/market_screen.dart'; import 'package:tane/ui/profile_screen.dart'; import 'package:tane/ui/settings_screen.dart'; @@ -139,6 +141,61 @@ void main() { await disposeTree(tester); }); + // The market/chat are "live" screens; checked here in their OFFLINE state + // (the shared connection can't reach a relay) — a static layout, and the one + // a user without signal actually sees. + Future offlineConn() async { + final social = await SocialService.fromRootSeedHex('00' * 32); + final settings = SocialSettings(InMemorySecretStore()); + await settings.setRelayUrls(const []); + return SocialConnection( + social: social, + settings: settings, + open: (_) async => throw StateError('offline'), + online: const Stream.empty(), + ); + } + + testWidgets('market (offline "set up sharing") fits a small screen', + (tester) async { + final db = newTestDatabase(); + addTearDown(db.close); + final connection = await offlineConn(); + await pumpSmall( + tester, + wrapScreen( + repository: newTestRepository(db), + locale: AppLocale.es, + child: MarketScreen( + social: await SocialService.fromRootSeedHex('00' * 32), + settings: SocialSettings(InMemorySecretStore()), + connection: connection, + ), + ), + ); + await disposeTree(tester); + }); + + testWidgets('chat (offline "set up sharing") fits a small screen', + (tester) async { + final db = newTestDatabase(); + addTearDown(db.close); + final connection = await offlineConn(); + await pumpSmall( + tester, + wrapScreen( + repository: newTestRepository(db), + locale: AppLocale.es, + child: ChatScreen( + social: await SocialService.fromRootSeedHex('00' * 32), + connection: connection, + peerPubkey: 'ab' * 32, + ), + ), + ); + await disposeTree(tester); + }); + testWidgets('inventory (empty) fits a small screen', (tester) async { final db = newTestDatabase(); addTearDown(db.close);