From a43bf35cd345fbe78b4636a2f1590726b0bb0fb5 Mon Sep 17 00:00:00 2001 From: mikecoomber Date: Fri, 22 Nov 2024 11:52:26 +0000 Subject: [PATCH] fix: Attachment names on comments now elipsize correctly --- lib/src/components/molecules/comment.dart | 30 ++++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/src/components/molecules/comment.dart b/lib/src/components/molecules/comment.dart index c4c62d7..ed604d7 100644 --- a/lib/src/components/molecules/comment.dart +++ b/lib/src/components/molecules/comment.dart @@ -246,20 +246,26 @@ class _AttachmentRow extends StatelessWidget { size: 40, ), SizedBox(width: spacing.small), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - attachment.name, - style: ZetaTextStyles.bodySmall, - ), - if (attachment.size != null) + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ Text( - attachment.size!, - style: ZetaTextStyles.bodySmall.copyWith(color: colors.textSubtle), + attachment.name, + style: ZetaTextStyles.bodySmall, + maxLines: 1, + overflow: TextOverflow.ellipsis, ), - ], + if (attachment.size != null) + Text( + attachment.size!, + style: ZetaTextStyles.bodySmall.copyWith(color: colors.textSubtle), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ], + ), ), ], ),