diff options
author | Henry Goodman <79623665+henrygoodman@users.noreply.github.com> | 2024-12-29 22:04:13 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-29 11:04:13 +0000 |
commit | a96776b3cbaf69a812677d3b49b41ab3eb8ac860 (patch) | |
tree | 7a06ca75e45501d181d258fb5aaac33cdde7880a | |
parent | ff96873e3e14f6eae853ec8eee59ab4482962c43 (diff) | |
download | gitea-a96776b3cbaf69a812677d3b49b41ab3eb8ac860.tar.gz gitea-a96776b3cbaf69a812677d3b49b41ab3eb8ac860.zip |
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 <wxiaoguang@gmail.com>
-rw-r--r-- | templates/repo/issue/view_content/comments.tmpl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 9fdbf45939..2e1a67edcc 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -365,8 +365,9 @@ {{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 */}} - <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}}> + The condition depends on whether the comment has contents/attachments, + review's comment is also controlled/rendered by issue comment's Content field */}} + <a class="timeline-avatar{{if or .Content .Attachments}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}> {{ctx.AvatarUtils.Avatar .Poster 40}} </a> {{end}} |