From 0f80e9349fc7ebda62ae080ed73c6eb193df886f Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Fri, 9 Jan 2026 12:06:17 -0500 Subject: [PATCH] chore: reduce span card spacing to reduce unneeded scroll (#5160) * chore: reduce span card spacing to reduce unneeded scroll * remove debugging code --- lib/pangea/choreographer/igc/span_card.dart | 66 ++++++++++----------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/lib/pangea/choreographer/igc/span_card.dart b/lib/pangea/choreographer/igc/span_card.dart index 67adb59e5..a69225650 100644 --- a/lib/pangea/choreographer/igc/span_card.dart +++ b/lib/pangea/choreographer/igc/span_card.dart @@ -182,6 +182,7 @@ class SpanCardState extends State { langCode: MatrixState .pangeaController.userController.userL2Code!, ), + const SizedBox(), _SpanCardFeedback( _selectedChoice != null, _fetchFeedback, @@ -217,42 +218,37 @@ class _SpanCardFeedback extends StatelessWidget { @override Widget build(BuildContext context) { - return ConstrainedBox( - constraints: const BoxConstraints( - minHeight: 50.0, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - ValueListenableBuilder( - valueListenable: feedbackState, - builder: (context, state, __) { - return switch (state) { - AsyncIdle() => hasSelectedChoice - ? IconButton( - onPressed: fetchFeedback, - icon: const Icon(Icons.lightbulb_outline, size: 24), - ) - : Text( - L10n.of(context).correctionDefaultPrompt, - style: BotStyle.text(context).copyWith( - fontStyle: FontStyle.italic, - ), + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + ValueListenableBuilder( + valueListenable: feedbackState, + builder: (context, state, __) { + return switch (state) { + AsyncIdle() => hasSelectedChoice + ? IconButton( + onPressed: fetchFeedback, + icon: const Icon(Icons.lightbulb_outline, size: 24), + ) + : Text( + L10n.of(context).correctionDefaultPrompt, + style: BotStyle.text(context).copyWith( + fontStyle: FontStyle.italic, ), - AsyncLoading() => const SizedBox( - width: 24, - height: 24, - child: CircularProgressIndicator(), - ), - AsyncError(:final error) => - ErrorIndicator(message: error.toString()), - AsyncLoaded(:final value) => - Text(value, style: BotStyle.text(context)), - }; - }, - ), - ], - ), + ), + AsyncLoading() => const SizedBox( + width: 24, + height: 24, + child: CircularProgressIndicator(), + ), + AsyncError(:final error) => + ErrorIndicator(message: error.toString()), + AsyncLoaded(:final value) => + Text(value, style: BotStyle.text(context)), + }; + }, + ), + ], ); } }