Add icon to buttons "Close with Comment", "Close Pull Request", "Close Issue" (#36654)

Newbies often use the "Close with Comments" button instead of deleting
their comment. Icon should prevent mis-clicks.

---------

Co-authored-by: Yuriy.Khlynovskiy <yuriy.khlynovskiy@incomsystem.ru>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Yuriy Khlynovskiy
2026-02-22 16:12:07 +03:00
committed by GitHub
parent eb59b1a24a
commit d9ac0636d0
9 changed files with 31 additions and 19 deletions

View File

@@ -513,7 +513,8 @@ async function initSingleCommentEditor(commentForm: HTMLFormElement) {
const syncUiState = () => {
const editorText = editor.value().trim(), isUploading = editor.isUploading();
if (statusButton) {
statusButton.textContent = statusButton.getAttribute(editorText ? 'data-status-and-comment' : 'data-status');
const statusText = statusButton.getAttribute(editorText ? 'data-status-and-comment' : 'data-status');
statusButton.querySelector<HTMLElement>('.status-button-text')!.textContent = statusText;
statusButton.disabled = isUploading;
}
if (commentButton) {