Skip to content

Commit a96776b

Browse files
Fix review code comment avatar alignment (#33031)
Fixes #33017 Avatar should only have offset if the `Comment` has `Content` or `Attachment` to align with the speech bubble. --------- Co-authored-by: wxiaoguang <[email protected]>
1 parent ff96873 commit a96776b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templates/repo/issue/view_content/comments.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@
365365
{{if .Review}}{{$reviewType = .Review.Type}}{{end}}
366366
{{if not .OriginalAuthor}}
367367
{{/* Some timeline avatars need a offset to correctly align with their speech bubble.
368-
The condition depends on whether the comment has contents/attachments or reviews */}}
369-
<a class="timeline-avatar{{if or .Content .Attachments (and .Review .Review.CodeComments)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
368+
The condition depends on whether the comment has contents/attachments,
369+
review's comment is also controlled/rendered by issue comment's Content field */}}
370+
<a class="timeline-avatar{{if or .Content .Attachments}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
370371
{{ctx.AvatarUtils.Avatar .Poster 40}}
371372
</a>
372373
{{end}}

0 commit comments

Comments
 (0)