From 6d90d8f37ded3fe8a9fe3284bb95933d17c4ca06 Mon Sep 17 00:00:00 2001 From: Gusted Date: Sat, 15 Oct 2022 00:19:01 +0200 Subject: [PATCH 1/4] Improve code comment review on mobile - Fix placement of avatar image, this was not placed in the `comment-header-left` and add CSS to cover the limiting of width+height of avatar for code-review comment on "Files changed" page. This fixes the big noticeable avatar issue. - Apply `margin-bottom` to the "next" button, so it's consistent with the "previous" button. - Make sure the "next"/"previous" start at `flex-start` on mobile and not off-screen at `flex-end`. - Add `flex: 1` to the text, so the browser will nicely wrap the "XXX commented XXX ago" text besides the avatar and make the header a bit more compact, still not ideal. - Resolves #20074 --- templates/repo/diff/comments.tmpl | 7 ++----- templates/repo/diff/conversation.tmpl | 2 +- web_src/less/_repository.less | 3 +++ web_src/less/_review.less | 11 +++++++---- web_src/less/helpers.less | 1 + 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 5d298f820c274..f7432f827136a 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -2,15 +2,11 @@ {{$createdStr:= TimeSinceUnix .CreatedUnix $.root.locale}}
- {{if .OriginalAuthor}} - - {{else}} - {{template "shared/user/avatarlink" .Poster}} - {{end}}
{{if .OriginalAuthor}} + {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} @@ -24,6 +20,7 @@ {{end}} {{else}} + {{template "shared/user/avatarlink" .Poster}} {{template "shared/user/namelink" .Poster}} {{$.root.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index 781e1f6819cbf..204a2146f850d 100644 --- a/templates/repo/diff/conversation.tmpl +++ b/templates/repo/diff/conversation.tmpl @@ -26,7 +26,7 @@ {{template "repo/diff/comments" dict "root" $ "comments" .comments}}
-
+