Skip to content

Commit bc55a80

Browse files
authored
Fix comment review avatar alignment (#29935)
Fix #29934
1 parent 8cad44f commit bc55a80

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

templates/repo/issue/view_content/comments.tmpl

+3-4
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,9 @@
374374
{{$reviewType := -1}}
375375
{{if .Review}}{{$reviewType = .Review.Type}}{{end}}
376376
{{if not .OriginalAuthor}}
377-
{{/* Some timeline avatars need a offset to correctly align with their speech
378-
bubble. The condition depends on review type and for positive reviews whether
379-
there is a comment element or not */}}
380-
<a class="timeline-avatar{{if or (and (eq $reviewType 1) (or .Content .Attachments)) (and (eq $reviewType 2) (or .Content .Attachments)) (eq $reviewType 3)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
377+
{{/* Some timeline avatars need a offset to correctly align with their speech bubble.
378+
The condition depends on whether the comment has contents/attachments or reviews */}}
379+
<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}}>
381380
{{ctx.AvatarUtils.Avatar .Poster 40}}
382381
</a>
383382
{{end}}

0 commit comments

Comments
 (0)