From 7801036fa1156e4adcd59aa4845dd03411da4a72 Mon Sep 17 00:00:00 2001 From: "Yuriy.Khlynovskiy" Date: Tue, 17 Feb 2026 10:18:42 +0300 Subject: [PATCH 01/11] init --- templates/repo/issue/view_content.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index b7fec4a07d0e0..dceeded366f87 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -94,6 +94,7 @@ {{$closeTranslationKey = "repo.pulls.close"}} {{end}} {{end}} From 67c57610e65d37754e2e8fd4abe1bf5c44386a95 Mon Sep 17 00:00:00 2001 From: "Yuriy.Khlynovskiy" Date: Wed, 18 Feb 2026 16:41:53 +0300 Subject: [PATCH 02/11] Add status-button- wrappers --- templates/repo/issue/view_content.tmpl | 4 ++-- web_src/js/features/repo-issue.ts | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index dceeded366f87..a7fd143cdac60 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -94,8 +94,8 @@ {{$closeTranslationKey = "repo.pulls.close"}} {{end}} {{end}} {{end}} diff --git a/web_src/js/features/repo-issue.ts b/web_src/js/features/repo-issue.ts index 4b04ed4ccf038..091dcbb61f0ec 100644 --- a/web_src/js/features/repo-issue.ts +++ b/web_src/js/features/repo-issue.ts @@ -513,7 +513,13 @@ 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') ?? ''; + const statusTextEl = statusButton.querySelector('.status-button-text'); + if (statusTextEl) { + statusTextEl.textContent = statusText; + } else { + statusButton.textContent = statusText; + } statusButton.disabled = isUploading; } if (commentButton) { From b25786b4d5281c78bb4410c75a59105a418a8d26 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 22 Feb 2026 10:53:21 +0100 Subject: [PATCH 03/11] Use neutral button style with colored icons for close/reopen buttons Match GitHub's rendering: monochrome button background with only the icon colored (red for close, green for reopen). Also add icon and text wrappers to the reopen button for consistency. Co-Authored-By: Claude Opus 4.6 --- templates/repo/issue/view_content.tmpl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index a7fd143cdac60..9550b0a6e8efc 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -85,16 +85,17 @@
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}} {{if .Issue.IsClosed}} - {{else}} {{$closeTranslationKey := "repo.issues.close"}} {{if .Issue.IsPull}} {{$closeTranslationKey = "repo.pulls.close"}} {{end}} - {{end}} From 081be8fda3f4e40fd70cfe60d37ca3939648cbba Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 22 Feb 2026 10:54:53 +0100 Subject: [PATCH 04/11] Use specific reopen text for issues and pull requests Change "Reopen" to "Reopen Issue" and "Reopen Pull Request" to match the close button pattern which already distinguishes between them. Co-Authored-By: Claude Opus 4.6 --- options/locale/locale_en-US.json | 3 ++- templates/repo/issue/view_content.tmpl | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/options/locale/locale_en-US.json b/options/locale/locale_en-US.json index 93ac046612def..72cdfbc40f1a6 100644 --- a/options/locale/locale_en-US.json +++ b/options/locale/locale_en-US.json @@ -1533,7 +1533,7 @@ "repo.issues.comment_pull_merged_at": "merged commit %[1]s into %[2]s %[3]s", "repo.issues.comment_manually_pull_merged_at": "manually merged commit %[1]s into %[2]s %[3]s", "repo.issues.close_comment_issue": "Close with Comment", - "repo.issues.reopen_issue": "Reopen", + "repo.issues.reopen_issue": "Reopen Issue", "repo.issues.reopen_comment_issue": "Reopen with Comment", "repo.issues.create_comment": "Comment", "repo.issues.comment.blocked_user": "Cannot create or edit comment because you are blocked by the poster or repository owner.", @@ -1877,6 +1877,7 @@ "repo.pulls.update_not_allowed": "You are not allowed to update branch", "repo.pulls.outdated_with_base_branch": "This branch is out-of-date with the base branch", "repo.pulls.close": "Close Pull Request", + "repo.pulls.reopen": "Reopen Pull Request", "repo.pulls.closed_at": "closed this pull request %[2]s", "repo.pulls.reopened_at": "reopened this pull request %[2]s", "repo.pulls.cmd_instruction_hint": "View command line instructions", diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 9550b0a6e8efc..1842e5db9fe55 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -85,9 +85,13 @@
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}} {{if .Issue.IsClosed}} - {{else}} {{$closeTranslationKey := "repo.issues.close"}} From a00e0e6f2af168495f6bb955b77634741f19dbb6 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 22 Feb 2026 10:59:10 +0100 Subject: [PATCH 05/11] use Iif and ternary --- templates/repo/issue/view_content.tmpl | 20 ++++++-------------- web_src/js/features/repo-issue.ts | 7 +------ 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 1842e5db9fe55..70fb229c93dbc 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -85,22 +85,14 @@
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}} {{if .Issue.IsClosed}} - {{$reopenTranslationKey := "repo.issues.reopen_issue"}} - {{if .Issue.IsPull}} - {{$reopenTranslationKey = "repo.pulls.reopen"}} - {{end}} - {{else}} - {{$closeTranslationKey := "repo.issues.close"}} - {{if .Issue.IsPull}} - {{$closeTranslationKey = "repo.pulls.close"}} - {{end}} - {{end}} {{end}} diff --git a/web_src/js/features/repo-issue.ts b/web_src/js/features/repo-issue.ts index 091dcbb61f0ec..652ffa17a868b 100644 --- a/web_src/js/features/repo-issue.ts +++ b/web_src/js/features/repo-issue.ts @@ -514,12 +514,7 @@ async function initSingleCommentEditor(commentForm: HTMLFormElement) { const editorText = editor.value().trim(), isUploading = editor.isUploading(); if (statusButton) { const statusText = statusButton.getAttribute(editorText ? 'data-status-and-comment' : 'data-status') ?? ''; - const statusTextEl = statusButton.querySelector('.status-button-text'); - if (statusTextEl) { - statusTextEl.textContent = statusText; - } else { - statusButton.textContent = statusText; - } + (statusButton.querySelector('.status-button-text') ?? statusButton).textContent = statusText; statusButton.disabled = isUploading; } if (commentButton) { From d09d751d4ce16bd8c1a1ff7891b572d870674f83 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 22 Feb 2026 11:03:09 +0100 Subject: [PATCH 06/11] use ! --- web_src/js/features/repo-issue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/js/features/repo-issue.ts b/web_src/js/features/repo-issue.ts index 652ffa17a868b..650708a82e347 100644 --- a/web_src/js/features/repo-issue.ts +++ b/web_src/js/features/repo-issue.ts @@ -514,7 +514,7 @@ async function initSingleCommentEditor(commentForm: HTMLFormElement) { const editorText = editor.value().trim(), isUploading = editor.isUploading(); if (statusButton) { const statusText = statusButton.getAttribute(editorText ? 'data-status-and-comment' : 'data-status') ?? ''; - (statusButton.querySelector('.status-button-text') ?? statusButton).textContent = statusText; + statusButton.querySelector('.status-button-text')!.textContent = statusText; statusButton.disabled = isUploading; } if (commentButton) { From c52d2dae851fb5f436851a6c2a24a6d84c543428 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 22 Feb 2026 11:11:37 +0100 Subject: [PATCH 07/11] Increase button gap and remove redundant margin classes Double the gap on .ui.button (keeping compact buttons at default), and remove now-unnecessary tw-mr-1/tw-mr-2 from SVG icons inside buttons. Co-Authored-By: Claude Opus 4.6 --- templates/repo/graph.tmpl | 4 ++-- templates/repo/issue/view_content.tmpl | 4 ++-- templates/repo/view_content.tmpl | 2 +- templates/user/settings/applications.tmpl | 2 +- templates/user/settings/applications_oauth2_list.tmpl | 4 ++-- web_src/css/base.css | 8 ++++++++ 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/templates/repo/graph.tmpl b/templates/repo/graph.tmpl index cd115f95dccdd..33ff19f3b5ab0 100644 --- a/templates/repo/graph.tmpl +++ b/templates/repo/graph.tmpl @@ -40,8 +40,8 @@ {{end}}
- - + +
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 70fb229c93dbc..bed09f1ae4ad9 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -86,12 +86,12 @@ {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}} {{if .Issue.IsClosed}} {{else}} {{end}} diff --git a/templates/repo/view_content.tmpl b/templates/repo/view_content.tmpl index abda754271103..0992078b6734f 100644 --- a/templates/repo/view_content.tmpl +++ b/templates/repo/view_content.tmpl @@ -116,7 +116,7 @@ {{end}} {{if and (not $isTreePathRoot) (not .IsViewFile) (not .IsBlame)}}{{/* IsViewDirectory (not home), TODO: split the templates, avoid using "if" tricks */}} - {{svg "octicon-history" 16 "tw-mr-2"}}{{ctx.Locale.Tr "repo.file_history"}} + {{svg "octicon-history"}}{{ctx.Locale.Tr "repo.file_history"}} {{end}}
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl index cae00b966bf7e..b1cec48e1bc51 100644 --- a/templates/user/settings/applications.tmpl +++ b/templates/user/settings/applications.tmpl @@ -41,7 +41,7 @@
diff --git a/templates/user/settings/applications_oauth2_list.tmpl b/templates/user/settings/applications_oauth2_list.tmpl index e1439a9369ac4..f1cc09460e3d9 100644 --- a/templates/user/settings/applications_oauth2_list.tmpl +++ b/templates/user/settings/applications_oauth2_list.tmpl @@ -21,12 +21,12 @@ {{ctx.Locale.Tr "locked"}} {{else}} - {{svg "octicon-pencil" 16 "tw-mr-1"}} + {{svg "octicon-pencil"}} {{ctx.Locale.Tr "settings.oauth2_application_edit"}} {{end}} diff --git a/web_src/css/base.css b/web_src/css/base.css index cdd1e28d4fcea..f13f4b8a386b9 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1107,6 +1107,14 @@ table th[data-sortt-desc] .svg { min-width: 0; /* make ellipsis work */ } +.ui.ui.button { + gap: calc(2 * var(--gap-inline)); +} + +.ui.ui.button.compact { + gap: var(--gap-inline); +} + .ui.multiple.selection.dropdown { flex-wrap: wrap; } From 1d1ff2d079be89c05b4eef7c34def400b90fa60f Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 22 Feb 2026 20:28:40 +0800 Subject: [PATCH 08/11] fix --- templates/repo/issue/view_content.tmpl | 21 +++++++++++++-------- web_src/css/base.css | 9 --------- web_src/css/modules/button.css | 6 ++++++ 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index bed09f1ae4ad9..8cd02ff23bae0 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -84,17 +84,22 @@