Skip to content

Commit

Permalink
Better styling for code review comment form (go-gitea#11413)
Browse files Browse the repository at this point in the history
Co-authored-by: techknowlogick <[email protected]>
  • Loading branch information
2 people authored and Yohann Delafollye committed Jul 31, 2020
1 parent 27e2a50 commit d81fe81
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions templates/repo/diff/section_unified.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
{{$isNotPending := (not (eq (index $line.Comments 0).Review.Type 0))}}
<tr>
<td colspan="2" class="lines-num"></td>
<td class="lines-type-marker"></td>
<td class="add-comment-left add-comment-right">
<td class="add-comment-left add-comment-right" colspan="2">
{{if $resolved}}
<div class = "ui attached header">
<span class="ui grey text left"><b>{{$resolveDoer.Name}}</b> {{$.root.i18n.Tr "repo.issues.review.resolved_by"}}</span>
Expand Down
2 changes: 1 addition & 1 deletion web_src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ function initPullRequestReview() {
if (!ntr.hasClass('add-comment')) {
ntr = $(`<tr class="add-comment">${
isSplit ? '<td class="lines-num"></td><td class="lines-type-marker"></td><td class="add-comment-left"></td><td class="lines-num"></td><td class="lines-type-marker"></td><td class="add-comment-right"></td>' :
'<td class="lines-num"></td><td class="lines-num"></td><td class="lines-type-marker"></td><td class="add-comment-left add-comment-right"></td>'
'<td class="lines-num"></td><td class="lines-num"></td><td class="add-comment-left add-comment-right" colspan="2"></td>'
}</tr>`);
tr.after(ntr);
}
Expand Down
8 changes: 6 additions & 2 deletions web_src/less/_review.less
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,13 @@
margin-top: 0;
}

.comment-list {
padding-bottom: 10px;
}

.footer {
border-top: 1px solid #f1f1f1;
margin-top: 10px;
padding: 10px 0 10px 0;

.markdown-info {
display: inline-block;
Expand All @@ -101,7 +105,7 @@
}

form.comment-form-reply {
margin: 0 0 0 4em;
margin: 0 0 0 1em;
}
}

Expand Down

0 comments on commit d81fe81

Please sign in to comment.