Code comments improvements (#15722)
- Right-align the Reply and Resolve buttons - Center Resolved text and add some padding - Add padding to inline comments - Indent the comment content to align with author name - Re-parent form to allow better button layout space. Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
24ad131221
commit
2a9b8d173a
7 changed files with 65 additions and 41 deletions
|
@ -1175,7 +1175,7 @@ async function initRepository() {
|
|||
const form = $(e.currentTarget).closest('form');
|
||||
if (form.length > 0 && form.hasClass('comment-form')) {
|
||||
form.addClass('hide');
|
||||
form.parent().find('button.comment-form-reply').show();
|
||||
form.closest('.comment-code-cloud').find('button.comment-form-reply').show();
|
||||
} else {
|
||||
form.closest('.comment-code-cloud').remove();
|
||||
}
|
||||
|
@ -1339,7 +1339,7 @@ function initPullRequestReview() {
|
|||
$(document).on('click', 'button.comment-form-reply', function (e) {
|
||||
e.preventDefault();
|
||||
$(this).hide();
|
||||
const form = $(this).parent().find('.comment-form');
|
||||
const form = $(this).closest('.comment-code-cloud').find('.comment-form');
|
||||
form.removeClass('hide');
|
||||
const $textarea = form.find('textarea');
|
||||
let $simplemde;
|
||||
|
|
|
@ -469,6 +469,10 @@ a.ui.card:hover,
|
|||
border-top-color: var(--color-secondary-light-1) !important;
|
||||
}
|
||||
|
||||
.ui.comments .comment .text {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ui.comments .comment .text,
|
||||
.ui.comments .comment .author {
|
||||
color: var(--color-text);
|
||||
|
@ -1633,6 +1637,11 @@ a.ui.label:hover {
|
|||
border-color: var(--color-light-border);
|
||||
}
|
||||
|
||||
.ui.labeled.icon.buttons > .button > .icon,
|
||||
.ui.labeled.icon.button > .icon {
|
||||
background: var(--color-hover);
|
||||
}
|
||||
|
||||
.ui.blue.button,
|
||||
.ui.blue.buttons .button,
|
||||
.ui.primary.button,
|
||||
|
|
|
@ -1058,7 +1058,7 @@
|
|||
|
||||
.code-comment {
|
||||
border: 1px solid transparent;
|
||||
padding: .5rem 0;
|
||||
padding: .25rem .5rem;
|
||||
margin: 0;
|
||||
|
||||
.content {
|
||||
|
@ -1076,6 +1076,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.comment-content {
|
||||
margin-left: 36px;
|
||||
}
|
||||
|
||||
.avatar.image {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
|
@ -1094,7 +1098,7 @@
|
|||
}
|
||||
|
||||
button.comment-form-reply {
|
||||
margin-left: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,14 +112,10 @@
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button.comment-form-reply {
|
||||
margin: .5em .5em .5em 4.5em;
|
||||
}
|
||||
|
||||
form.comment-form-reply {
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
.diff-file-body .comment-form {
|
||||
margin: 0 0 0 3em;
|
||||
}
|
||||
|
||||
.file-comment {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue