From 23d0f9083e2d8b735b1b0578c348f73c0e4ae3dc Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Thu, 21 Nov 2024 09:23:50 +0800 Subject: [PATCH 01/10] make search box in issue sidebar dropdown list always show when scrolling (#32576) as title, replace #31597 after #32460 --------- Signed-off-by: a1012112796 <1012112796@qq.com> --- .../repo/issue/sidebar/assignee_list.tmpl | 14 ++++---- templates/repo/issue/sidebar/label_list.tmpl | 36 ++++++++++--------- .../repo/issue/sidebar/milestone_list.tmpl | 34 +++++++++--------- .../repo/issue/sidebar/project_list.tmpl | 34 +++++++++--------- .../repo/issue/sidebar/reviewer_list.tmpl | 36 ++++++++++--------- web_src/css/repo.css | 6 ++++ 6 files changed, 88 insertions(+), 72 deletions(-) diff --git a/templates/repo/issue/sidebar/assignee_list.tmpl b/templates/repo/issue/sidebar/assignee_list.tmpl index bee6123e52ce7..d8ccd73387de7 100644 --- a/templates/repo/issue/sidebar/assignee_list.tmpl +++ b/templates/repo/issue/sidebar/assignee_list.tmpl @@ -16,12 +16,14 @@
{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}
- {{range $data.CandidateAssignees}} - - {{svg "octicon-check"}} - {{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}} - - {{end}} +
diff --git a/templates/repo/issue/sidebar/label_list.tmpl b/templates/repo/issue/sidebar/label_list.tmpl index ed80047661bc0..526eb1ec0448a 100644 --- a/templates/repo/issue/sidebar/label_list.tmpl +++ b/templates/repo/issue/sidebar/label_list.tmpl @@ -17,25 +17,27 @@
{{ctx.Locale.Tr "repo.issues.new.clear_labels"}} - {{$previousExclusiveScope := "_no_scope"}} - {{range $data.RepoLabels}} - {{$exclusiveScope := .ExclusiveScope}} - {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}} -
+ {{end}} diff --git a/templates/repo/issue/sidebar/milestone_list.tmpl b/templates/repo/issue/sidebar/milestone_list.tmpl index 4f2b4cb06fb21..2d16c6e1b414f 100644 --- a/templates/repo/issue/sidebar/milestone_list.tmpl +++ b/templates/repo/issue/sidebar/milestone_list.tmpl @@ -20,25 +20,27 @@
{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}
- {{if $data.OpenMilestones}} -
-
{{ctx.Locale.Tr "repo.issues.new.open_milestone"}}
- {{range $data.OpenMilestones}} - - {{svg "octicon-milestone" 18}} {{.Name}} - + diff --git a/templates/repo/issue/sidebar/project_list.tmpl b/templates/repo/issue/sidebar/project_list.tmpl index ab1243caddcb2..6ca6156d2cc87 100644 --- a/templates/repo/issue/sidebar/project_list.tmpl +++ b/templates/repo/issue/sidebar/project_list.tmpl @@ -18,24 +18,26 @@ {{end}}
{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}
- {{if $data.OpenProjects}} -
-
{{ctx.Locale.Tr "repo.issues.new.open_projects"}}
- {{range $data.OpenProjects}} - - {{svg .IconName 18}} {{.Title}} - +
diff --git a/templates/repo/issue/sidebar/reviewer_list.tmpl b/templates/repo/issue/sidebar/reviewer_list.tmpl index e990fc5afc87d..16eea23d69c83 100644 --- a/templates/repo/issue/sidebar/reviewer_list.tmpl +++ b/templates/repo/issue/sidebar/reviewer_list.tmpl @@ -17,27 +17,29 @@
{{end}} - {{range $data.Reviewers}} - {{if .User}} - - {{svg "octicon-check"}} - {{ctx.AvatarUtils.Avatar .User 20}} {{template "repo/search_name" .User}} - - {{end}} - {{end}} - {{if $data.TeamReviewers}} - {{if $data.Reviewers}}
{{end}} - {{range $data.TeamReviewers}} - {{if .Team}} - + diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 01ddab97e595c..7307b978702b8 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -66,6 +66,12 @@ overflow-x: auto; } +.issue-content-right .dropdown > .menu .item-secondary-info small { + display: block; + text-overflow: ellipsis; + overflow: hidden; +} + @media (max-width: 767.98px) { .issue-content-left, .issue-content-right { From efb55cd8ef484bbe949e95465b4c17d6e31e7270 Mon Sep 17 00:00:00 2001 From: Kerwin Bryant Date: Thu, 21 Nov 2024 10:42:37 +0800 Subject: [PATCH 02/10] Supplement and Improvement for #32558 (#32585) Thank you for @wxiaoguang's reminders and suggestions: https://github.com/go-gitea/gitea/pull/32558#discussion_r1849972913 --- options/locale/locale_en-US.ini | 2 +- templates/install.tmpl | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 122b70924a9ca..d75827be5c42f 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -352,7 +352,7 @@ enable_update_checker = Enable Update Checker enable_update_checker_helper = Checks for new version releases periodically by connecting to gitea.io. env_config_keys = Environment Configuration env_config_keys_prompt = The following environment variables will also be applied to your configuration file: -config_write_file_prompt = These configuration options will be written into: +config_write_file_prompt = These configuration options will be written into: %s [home] nav_menu = Navigation Menu diff --git a/templates/install.tmpl b/templates/install.tmpl index ea4023d409098..6c4cc7df01b0f 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -338,7 +338,9 @@
- {{ctx.Locale.Tr "install.config_write_file_prompt"}} {{.CustomConfFile}} + {{$copyBtn := svg "octicon-copy" 14}} + {{$filePath := HTMLFormat `%s ` .CustomConfFile .CustomConfFile $copyBtn}} + {{ctx.Locale.Tr "install.config_write_file_prompt" $filePath}}
From 07373f1d5dd315966bc2f6085a8dd8cca193ec5c Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 21 Nov 2024 11:31:54 +0800 Subject: [PATCH 03/10] Improve issue sidebar UI (#32587) 1. remove duplicate dividers 2. align reviewer items 3. merge & remove unused CSS styles Before:
![image](https://github.com/user-attachments/assets/1b3121ee-b5fa-4fe9-b0f2-344d96dc5fbc) ![image](https://github.com/user-attachments/assets/ba8b97e6-114d-488c-adee-48f6c7a3b580)
After:
![image](https://github.com/user-attachments/assets/978eab3e-a5d7-4b68-90ce-079b61994d25) ![image](https://github.com/user-attachments/assets/a8b58a27-dd05-4c8d-be60-816439ce77c6) ![image](https://github.com/user-attachments/assets/b7e6a16c-bf98-4465-a805-9f4a642d366e)
--- templates/repo/issue/sidebar/label_list.tmpl | 2 +- templates/repo/issue/sidebar/milestone_list.tmpl | 3 +-- templates/repo/issue/sidebar/project_list.tmpl | 3 +-- templates/repo/issue/sidebar/reviewer_list.tmpl | 2 +- web_src/css/base.css | 4 ++++ web_src/css/repo.css | 10 ---------- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/templates/repo/issue/sidebar/label_list.tmpl b/templates/repo/issue/sidebar/label_list.tmpl index 526eb1ec0448a..fb8f1a667e75c 100644 --- a/templates/repo/issue/sidebar/label_list.tmpl +++ b/templates/repo/issue/sidebar/label_list.tmpl @@ -27,7 +27,7 @@ {{$previousExclusiveScope = $exclusiveScope}} {{template "repo/issue/sidebar/label_list_item" dict "Label" .}} {{end}} -
+ {{if and $data.RepoLabels $data.OrgLabels}}
{{end}} {{$previousExclusiveScope = "_no_scope"}} {{range $data.OrgLabels}} {{$exclusiveScope := .ExclusiveScope}} diff --git a/templates/repo/issue/sidebar/milestone_list.tmpl b/templates/repo/issue/sidebar/milestone_list.tmpl index 2d16c6e1b414f..a5ed0eef55a33 100644 --- a/templates/repo/issue/sidebar/milestone_list.tmpl +++ b/templates/repo/issue/sidebar/milestone_list.tmpl @@ -22,7 +22,6 @@
{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}