π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Make comments screen more similar to figma design
ashilkn03448e31e93e
diff --git a/mobile/apps/photos/lib/ui/social/comments_screen.dart b/mobile/apps/photos/lib/ui/social/comments_screen.dartindex fe4f19ba43..157a5fdb73 100644--- a/mobile/apps/photos/lib/ui/social/comments_screen.dart+++ b/mobile/apps/photos/lib/ui/social/comments_screen.dart@@ -245,6 +245,7 @@ class _CommentsScreenState extends State<CommentsScreen> {onFetchReactions: () =>_getReactionsForComment(comment.id),onReplyTap: () => _onReplyTap(comment),+ userResolver: _getUserForComment,);},),diff --git a/mobile/apps/photos/lib/ui/social/widgets/comment_actions_capsule.dart b/mobile/apps/photos/lib/ui/social/widgets/comment_actions_capsule.dartindex a89b407dda..69da272bf8 100644--- a/mobile/apps/photos/lib/ui/social/widgets/comment_actions_capsule.dart+++ b/mobile/apps/photos/lib/ui/social/widgets/comment_actions_capsule.dart@@ -16,9 +16,9 @@ class CommentActionsCapsule extends StatelessWidget {@overrideWidget build(BuildContext context) {final colorScheme = getEnteColorScheme(context);- final background = Theme.of(context).brightness == Brightness.dark- ? const Color(0xFF161616)- : const Color(0xFFF5F5F7);+ final isDark = Theme.of(context).brightness == Brightness.dark;+ final background = isDark ? const Color(0xFF161616) : const Color(0xFFF5F5F7);+ final iconColor = isDark ? const Color(0xFFFFFFFF) : const Color(0xFF131313);return Container(padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),@@ -38,7 +38,7 @@ class CommentActionsCapsule extends StatelessWidget {child: Icon(isLiked ? Icons.favorite : Icons.favorite_border,size: 18,- color: isLiked ? colorScheme.primary500 : colorScheme.textMuted,+ color: isLiked ? const Color(0xFF08C225) : iconColor,),),const SizedBox(width: 8),@@ -47,7 +47,7 @@ class CommentActionsCapsule extends StatelessWidget {child: Icon(Icons.reply,size: 18,- color: colorScheme.textMuted,+ color: iconColor,),),],diff --git a/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dart b/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dartindex ca64622d20..d94bbc6e35 100644--- a/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dart+++ b/mobile/apps/photos/lib/ui/social/widgets/comment_bubble_widget.dart@@ -19,6 +19,7 @@ class CommentBubbleWidget extends StatefulWidget {final Future<Comment?> Function()? onFetchParent;final Future<List<Reaction>> Function() onFetchReactions;final VoidCallback onReplyTap;+ final User Function(Comment) userResolver;const CommentBubbleWidget({required this.comment,@@ -29,6 +30,7 @@ class CommentBubbleWidget extends StatefulWidget {this.onFetchParent,required this.onFetchReactions,required this.onReplyTap,+ required this.userResolver,super.key,});@@ -122,6 +124,7 @@ class _CommentBubbleWidgetState extends State<CommentBubbleWidget> {isOwnComment: widget.isOwnComment,isLoadingParent: _isLoadingParent,parentComment: _parentComment,+ userResolver: widget.userResolver,),if (!_isLoadingReactions)Positioned(@@ -146,16 +149,17 @@ class _InlineParentQuote extends StatelessWidget {final bool isLoading;final Comment? parentComment;final bool isOwnComment;+ final User Function(Comment) userResolver;const _InlineParentQuote({required this.isLoading,required this.parentComment,required this.isOwnComment,+ required this.userResolver,});@overrideWidget build(BuildContext context) {- final colorScheme = getEnteColorScheme(context);final textTheme = getEnteTextTheme(context);if (isLoading) {@@ -173,39 +177,74 @@ class _InlineParentQuote extends StatelessWidget {}final parentText = parentComment?.data ?? "Original comment unavailable";+ final parentAuthor = parentComment != null+ ? userResolver(parentComment!).displayName ??+ userResolver(parentComment!).email+ : null;final isDarkMode = Theme.of(context).brightness == Brightness.dark;final lineColor = isOwnComment? (isDarkMode ? const Color(0x33000000) : const Color(0xFF08571C)): const Color(0xFF8C8C8C);+ final parentAuthorTextColor = isOwnComment+ ? textBaseDark+ : isDarkMode+ ? const Color(0xCCFFFFFF)+ : const Color(0xCC000000);++ final parentTextColor = isOwnComment+ ? const Color(0xCCFFFFFF)+ : isDarkMode+ ? const Color(0xB3FFFFFF)+ : const Color(0xB3000000);+return Container(margin: const EdgeInsets.only(bottom: 8),- child: Row(- crossAxisAlignment: CrossAxisAlignment.start,- mainAxisSize: MainAxisSize.min,- children: [- Container(- width: 3,- height: 14,- decoration: BoxDecoration(- color: lineColor,- borderRadius: BorderRadius.circular(1.5),+ child: IntrinsicHeight(+ child: Row(+ crossAxisAlignment: CrossAxisAlignment.stretch,+ mainAxisSize: MainAxisSize.min,+ children: [+ Container(+ width: 3,+ decoration: BoxDecoration(+ color: lineColor,+ borderRadius: BorderRadius.circular(1.5),+ ),),- ),- const SizedBox(width: 10),- Text(- parentText,- style: textTheme.tiny.copyWith(- height: 1.7,- color: isOwnComment- ? textBaseDark.withValues(alpha: 0.9)- : colorScheme.textMuted,+ const SizedBox(width: 10),+ Flexible(+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ mainAxisSize: MainAxisSize.min,+ children: [+ if (parentAuthor != null)+ Text(+ parentAuthor,+ style: textTheme.mini.copyWith(+ color: parentAuthorTextColor,+ height: 20 / 12,+ letterSpacing: -0.24,+ ),+ maxLines: 1,+ overflow: TextOverflow.ellipsis,+ ),+ Text(+ parentText,+ style: textTheme.tiny.copyWith(+ height: 17 / 10,+ letterSpacing: -0.3,+ color: parentTextColor,+ ),+ maxLines: 2,+ overflow: TextOverflow.ellipsis,+ ),+ ],+ ),),- maxLines: 2,- overflow: TextOverflow.ellipsis,- ),- ],+ ],+ ),),);}@@ -216,12 +255,14 @@ class _CommentBubble extends StatelessWidget {final bool isOwnComment;final bool isLoadingParent;final Comment? parentComment;+ final User Function(Comment) userResolver;const _CommentBubble({required this.comment,required this.isOwnComment,required this.isLoadingParent,required this.parentComment,+ required this.userResolver,});@override@@ -232,7 +273,7 @@ class _CommentBubble extends StatelessWidget {final textColor = isOwnComment ? textBaseDark : colorScheme.textBase;final bubbleColor = isOwnComment- ? const Color(0xFF0DAF35)+ ? (isDarkMode ? const Color(0xFF056C1F) : const Color(0xFF0DAF35)): isDarkMode? const Color(0xFF212121): const Color(0xFFF0F0F0);@@ -259,6 +300,7 @@ class _CommentBubble extends StatelessWidget {isLoading: isLoadingParent,parentComment: parentComment,isOwnComment: isOwnComment,+ userResolver: userResolver,),Text(comment.data,diff --git a/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart b/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dartindex 2eb6c73a61..0c6d678f62 100644--- a/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart+++ b/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart@@ -55,6 +55,7 @@ class CommentInputWidget extends StatelessWidget {),child: Column(mainAxisSize: MainAxisSize.min,+ crossAxisAlignment: CrossAxisAlignment.start,children: [if (replyingTo != null && replyingToUser != null)ReplyPreviewWidget(diff --git a/mobile/apps/photos/lib/ui/social/widgets/reply_preview_widget.dart b/mobile/apps/photos/lib/ui/social/widgets/reply_preview_widget.dartindex adc85e5b3c..ef88521e40 100644--- a/mobile/apps/photos/lib/ui/social/widgets/reply_preview_widget.dart+++ b/mobile/apps/photos/lib/ui/social/widgets/reply_preview_widget.dart@@ -22,16 +22,26 @@ class ReplyPreviewWidget extends StatelessWidget {final textTheme = getEnteTextTheme(context);return Container(- padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),+ // padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 24),+ padding: const EdgeInsets.fromLTRB(12, 24, 12, 12),decoration: const BoxDecoration(color: Colors.transparent,borderRadius: BorderRadius.vertical(top: Radius.circular(8)),),- child: Row(- children: [- Expanded(- child: Column(+ child: IntrinsicHeight(+ child: Row(+ children: [+ Container(+ width: 3,+ decoration: BoxDecoration(+ color: const Color(0xFF8C8C8C),+ borderRadius: BorderRadius.circular(1.5),+ ),+ ),+ const SizedBox(width: 10),+ Column(crossAxisAlignment: CrossAxisAlignment.start,+ mainAxisAlignment: MainAxisAlignment.start,mainAxisSize: MainAxisSize.min,children: [Text(@@ -49,8 +59,8 @@ class ReplyPreviewWidget extends StatelessWidget {),],),- ),- ],+ ],+ ),),);}diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dart b/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dartindex 19f48ed578..7bc5c9b55d 100644--- a/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/file_bottom_bar.dart@@ -14,7 +14,6 @@ import "package:photos/models/file/trash_file.dart";import "package:photos/models/selected_files.dart";import "package:photos/models/social/social_data_provider.dart";import "package:photos/services/collections_service.dart";-import "package:photos/theme/ente_theme.dart";import "package:photos/ui/actions/file/file_actions.dart";import "package:photos/ui/collections/collection_action_sheet.dart";import "package:photos/ui/social/comments_screen.dart";@@ -314,9 +313,7 @@ class FileBottomBarState extends State<FileBottomBar> {: (Platform.isAndroid? Icons.favorite_border: Icons.favorite_border_rounded),- color: _hasLiked- ? getEnteColorScheme(context).primary700- : Colors.white,+ color: _hasLiked ? const Color(0xFF08C225) : Colors.white,),),);