From 71f704ef870f3e06f7cb965fba50ce9f233cdcab Mon Sep 17 00:00:00 2001
From: Henry <13032204@student.uts.edu.au>
Date: Sun, 29 Dec 2024 07:37:36 +0000
Subject: [PATCH 1/3] Fix avatar alignment for code comment
---
templates/repo/issue/view_content/comments.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 9fdbf45939060..2e2cf0d27b44e 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -366,7 +366,7 @@
{{if not .OriginalAuthor}}
{{/* Some timeline avatars need a offset to correctly align with their speech bubble.
The condition depends on whether the comment has contents/attachments or reviews */}}
-
+
{{ctx.AvatarUtils.Avatar .Poster 40}}
{{end}}
From b5ab198bbd2e18746dba3a093fbcdfe85b42538d Mon Sep 17 00:00:00 2001
From: Henry <13032204@student.uts.edu.au>
Date: Sun, 29 Dec 2024 08:40:48 +0000
Subject: [PATCH 2/3] Simply check for Comment.Content to decide avatar offset
---
templates/repo/issue/view_content/comments.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 2e2cf0d27b44e..25f9adf57c339 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -366,7 +366,7 @@
{{if not .OriginalAuthor}}
{{/* Some timeline avatars need a offset to correctly align with their speech bubble.
The condition depends on whether the comment has contents/attachments or reviews */}}
-
+
{{ctx.AvatarUtils.Avatar .Poster 40}}
{{end}}
From 1260c997c695d02325e0d598fa01d081c49989fc Mon Sep 17 00:00:00 2001
From: wxiaoguang
Date: Sun, 29 Dec 2024 18:39:18 +0800
Subject: [PATCH 3/3] Update templates/repo/issue/view_content/comments.tmpl
---
templates/repo/issue/view_content/comments.tmpl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 25f9adf57c339..2e1a67edcc4ff 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -365,7 +365,8 @@
{{if .Review}}{{$reviewType = .Review.Type}}{{end}}
{{if not .OriginalAuthor}}
{{/* Some timeline avatars need a offset to correctly align with their speech bubble.
- The condition depends on whether the comment has contents/attachments or reviews */}}
+ The condition depends on whether the comment has contents/attachments,
+ review's comment is also controlled/rendered by issue comment's Content field */}}
{{ctx.AvatarUtils.Avatar .Poster 40}}