From 2a9b8d173a286a7155306d7d1df6328d1eb98199 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 8 May 2021 17:28:25 +0200 Subject: 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 --- web_src/js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web_src/js') diff --git a/web_src/js/index.js b/web_src/js/index.js index 5249b88516..d7fa9c8b9b 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -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; -- cgit v1.2.3