diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-10-25 11:11:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-25 19:11:49 +0800 |
commit | 29c00eb1ed13fbcd2a5e493d075c2bbd0e2a26f7 (patch) | |
tree | f89469e7905d14f15a7dca66a0977f4c3813cfb8 /templates/repo/diff | |
parent | 06a7ed4e04deec7718d3a3c0b4ae1c27f6cacc2c (diff) | |
download | gitea-29c00eb1ed13fbcd2a5e493d075c2bbd0e2a26f7.tar.gz gitea-29c00eb1ed13fbcd2a5e493d075c2bbd0e2a26f7.zip |
Improve code comment review on mobile (#21461)
- 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`. As well force them to have `flex: 1` so
they won't overflow on x-asis. This also requires the `width: 100%` for
the `.ui.buttons` div.
- Resolves #20074
### Before
<details><img width="512"
src="https://user-images.githubusercontent.com/25481501/195952930-09560cad-419f-43a3-a8a4-a4166c117994.jpg"></details>
### After
<details><img width="512"
src="https://user-images.githubusercontent.com/25481501/197340081-0365dfa8-4344-46b4-8702-a40c778c073f.jpg"></details>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'templates/repo/diff')
-rw-r--r-- | templates/repo/diff/conversation.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/section_split.tmpl | 8 | ||||
-rw-r--r-- | templates/repo/diff/section_unified.tmpl | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index 781e1f6819..204a2146f8 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}} </ui> </div> - <div class="df je ac fw mt-3"> + <div class="df je js-small ac fw mt-3"> <div class="ui buttons mr-2"> <button class="ui icon tiny basic button previous-conversation"> {{svg "octicon-arrow-up" 12 "icon"}} {{$.locale.Tr "repo.issues.previous"}} diff --git a/templates/repo/diff/section_split.tmpl b/templates/repo/diff/section_split.tmpl index 6143a47158..24302e536f 100644 --- a/templates/repo/diff/section_split.tmpl +++ b/templates/repo/diff/section_split.tmpl @@ -101,7 +101,7 @@ <td class="lines-num"></td> <td class="lines-escape"></td> <td class="lines-type-marker"></td> - <td class="add-comment-left"> + <td class="add-comment-left" colspan="4"> {{if gt (len $line.Comments) 0}} {{if eq $line.GetCommentSide "previous"}} {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} @@ -116,7 +116,7 @@ <td class="lines-num"></td> <td class="lines-escape"></td> <td class="lines-type-marker"></td> - <td class="add-comment-right"> + <td class="add-comment-right" colspan="4"> {{if eq $line.GetCommentSide "proposed"}} {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} {{end}} @@ -133,7 +133,7 @@ <td class="lines-num"></td> <td class="lines-escape"></td> <td class="lines-type-marker"></td> - <td class="add-comment-left"> + <td class="add-comment-left" colspan="4"> {{if gt (len $line.Comments) 0}} {{if eq $line.GetCommentSide "previous"}} {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} @@ -143,7 +143,7 @@ <td class="lines-num"></td> <td class="lines-escape"></td> <td class="lines-type-marker"></td> - <td class="add-comment-right"> + <td class="add-comment-right" colspan="4"> {{if eq $line.GetCommentSide "proposed"}} {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} {{end}} diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl index 373747002c..e83b1f779c 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -46,7 +46,7 @@ {{if gt (len $line.Comments) 0}} <tr class="add-comment" data-line-type="{{DiffLineTypeToStr .GetType}}"> <td colspan="3" class="lines-num"></td> - <td class="add-comment-left add-comment-right" colspan="2"> + <td class="add-comment-left add-comment-right" colspan="5"> {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} </td> </tr> |