]> source.dussan.org Git - gitea.git/commitdiff
make search box in issue sidebar dropdown list always show when scrolling (#32576)
authora1012112796 <1012112796@qq.com>
Thu, 21 Nov 2024 01:23:50 +0000 (09:23 +0800)
committerGitHub <noreply@github.com>
Thu, 21 Nov 2024 01:23:50 +0000 (09:23 +0800)
as title, replace #31597 after #32460

---------

Signed-off-by: a1012112796 <1012112796@qq.com>
templates/repo/issue/sidebar/assignee_list.tmpl
templates/repo/issue/sidebar/label_list.tmpl
templates/repo/issue/sidebar/milestone_list.tmpl
templates/repo/issue/sidebar/project_list.tmpl
templates/repo/issue/sidebar/reviewer_list.tmpl
web_src/css/repo.css

index bee6123e52ce7b2dfc4e0efc1381d9b08613e7a3..d8ccd73387de75b2b5c4917865498f804fcc488d 100644 (file)
                                <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}">
                        </div>
                        <div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
-                       {{range $data.CandidateAssignees}}
-                               <a class="item muted" href="#" data-value="{{.ID}}">
-                                       <span class="item-check-mark">{{svg "octicon-check"}}</span>
-                                       {{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}}
-                               </a>
-                       {{end}}
+                       <div class="scrolling menu">
+                               {{range $data.CandidateAssignees}}
+                                       <a class="item muted" href="#" data-value="{{.ID}}">
+                                               <span class="item-check-mark">{{svg "octicon-check"}}</span>
+                                               {{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}}
+                                       </a>
+                               {{end}}
+                       </div>
                </div>
        </div>
        <div class="ui list tw-flex tw-flex-row tw-gap-2">
index ed80047661bc0c8dc60b3afb4b82d4f21a59f40b..526eb1ec0448a05439aa5cd33edb61bb736de3f4 100644 (file)
                                        <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_labels"}}">
                                </div>
                                <a class="item clear-selection" href="#">{{ctx.Locale.Tr "repo.issues.new.clear_labels"}}</a>
-                               {{$previousExclusiveScope := "_no_scope"}}
-                               {{range $data.RepoLabels}}
-                                       {{$exclusiveScope := .ExclusiveScope}}
-                                       {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
-                                               <div class="divider"></div>
+                               <div class="scrolling menu">
+                                       {{$previousExclusiveScope := "_no_scope"}}
+                                       {{range $data.RepoLabels}}
+                                               {{$exclusiveScope := .ExclusiveScope}}
+                                               {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
+                                                       <div class="divider"></div>
+                                               {{end}}
+                                               {{$previousExclusiveScope = $exclusiveScope}}
+                                               {{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
                                        {{end}}
-                                       {{$previousExclusiveScope = $exclusiveScope}}
-                                       {{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
-                               {{end}}
-                               <div class="divider"></div>
-                               {{$previousExclusiveScope = "_no_scope"}}
-                               {{range $data.OrgLabels}}
-                                       {{$exclusiveScope := .ExclusiveScope}}
-                                       {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
-                                               <div class="divider"></div>
+                                       <div class="divider"></div>
+                                       {{$previousExclusiveScope = "_no_scope"}}
+                                       {{range $data.OrgLabels}}
+                                               {{$exclusiveScope := .ExclusiveScope}}
+                                               {{if and (ne $previousExclusiveScope "_no_scope") (ne $previousExclusiveScope $exclusiveScope)}}
+                                                       <div class="divider"></div>
+                                               {{end}}
+                                               {{$previousExclusiveScope = $exclusiveScope}}
+                                               {{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
                                        {{end}}
-                                       {{$previousExclusiveScope = $exclusiveScope}}
-                                       {{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
-                               {{end}}
+                               </div>
                        {{end}}
                </div>
        </div>
index 4f2b4cb06fb21c1916f6bf80c93143c1eef2b849..2d16c6e1b414f842e8539ab95fcc3101381ec131 100644 (file)
                                </div>
                                <div class="divider"></div>
                                <div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}</div>
-                               {{if $data.OpenMilestones}}
-                                       <div class="divider"></div>
-                                       <div class="header">{{ctx.Locale.Tr "repo.issues.new.open_milestone"}}</div>
-                                       {{range $data.OpenMilestones}}
-                                               <a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/issues?milestone={{.ID}}">
-                                                       {{svg "octicon-milestone" 18}} {{.Name}}
-                                               </a>
+                               <div class="scrolling menu">
+                                       {{if $data.OpenMilestones}}
+                                               <div class="divider"></div>
+                                               <div class="header">{{ctx.Locale.Tr "repo.issues.new.open_milestone"}}</div>
+                                               {{range $data.OpenMilestones}}
+                                                       <a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/issues?milestone={{.ID}}">
+                                                               {{svg "octicon-milestone" 18}} {{.Name}}
+                                                       </a>
+                                               {{end}}
                                        {{end}}
-                               {{end}}
-                               {{if $data.ClosedMilestones}}
-                                       <div class="divider"></div>
-                                       <div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_milestone"}}</div>
-                                       {{range $data.ClosedMilestones}}
-                                               <a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/issues?milestone={{.ID}}">
-                                                       {{svg "octicon-milestone" 18}} {{.Name}}
-                                               </a>
+                                       {{if $data.ClosedMilestones}}
+                                               <div class="divider"></div>
+                                               <div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_milestone"}}</div>
+                                               {{range $data.ClosedMilestones}}
+                                                       <a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/issues?milestone={{.ID}}">
+                                                               {{svg "octicon-milestone" 18}} {{.Name}}
+                                                       </a>
+                                               {{end}}
                                        {{end}}
                                {{end}}
-                       {{end}}
+                       </div>
                </div>
        </div>
 
index ab1243caddcb22a1a0a1794e14934ef08d11f6f6..6ca6156d2cc871b1809966924cb374974fdfcc9d 100644 (file)
                        </div>
                        {{end}}
                        <div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
-                       {{if $data.OpenProjects}}
-                               <div class="divider"></div>
-                               <div class="header">{{ctx.Locale.Tr "repo.issues.new.open_projects"}}</div>
-                               {{range $data.OpenProjects}}
-                                       <a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
-                                               {{svg .IconName 18}} {{.Title}}
-                                       </a>
+                       <div class="scrolling menu">
+                               {{if $data.OpenProjects}}
+                                       <div class="divider"></div>
+                                       <div class="header">{{ctx.Locale.Tr "repo.issues.new.open_projects"}}</div>
+                                       {{range $data.OpenProjects}}
+                                               <a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
+                                                       {{svg .IconName 18}} {{.Title}}
+                                               </a>
+                                       {{end}}
                                {{end}}
-                       {{end}}
-                       {{if $data.ClosedProjects}}
-                               <div class="divider"></div>
-                               <div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}</div>
-                               {{range $data.ClosedProjects}}
-                                       <a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
-                                               {{svg .IconName 18}} {{.Title}}
-                                       </a>
+                               {{if $data.ClosedProjects}}
+                                       <div class="divider"></div>
+                                       <div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}</div>
+                                       {{range $data.ClosedProjects}}
+                                               <a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
+                                                       {{svg .IconName 18}} {{.Title}}
+                                               </a>
+                                       {{end}}
                                {{end}}
-                       {{end}}
+                       </div>
                </div>
        </div>
        <div class="ui list">
index e990fc5afc87de2a76a08a460979597e03d12275..16eea23d69c83daf199665ebba1c52c490ef08a0 100644 (file)
                                        <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_reviewers"}}">
                                </div>
                        {{end}}
-                       {{range $data.Reviewers}}
-                               {{if .User}}
-                                       <a class="item muted {{if .Requested}}checked{{end}}" href="{{.User.HomeLink}}" data-value="{{.ItemID}}" data-can-change="{{.CanChange}}"
-                                               {{if not .CanChange}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
-                                               <span class="item-check-mark">{{svg "octicon-check"}}</span>
-                                               {{ctx.AvatarUtils.Avatar .User 20}} {{template "repo/search_name" .User}}
-                                       </a>
-                               {{end}}
-                       {{end}}
-                       {{if $data.TeamReviewers}}
-                               {{if $data.Reviewers}}<div class="divider"></div>{{end}}
-                               {{range $data.TeamReviewers}}
-                                       {{if .Team}}
-                                               <a class="item muted {{if .Requested}}checked{{end}}" href="#" data-value="{{.ItemID}}" data-can-change="{{.CanChange}}"
-                                                       {{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
+                       <div class="scrolling menu">
+                               {{range $data.Reviewers}}
+                                       {{if .User}}
+                                               <a class="item muted {{if .Requested}}checked{{end}}" href="{{.User.HomeLink}}" data-value="{{.ItemID}}" data-can-change="{{.CanChange}}"
+                                                       {{if not .CanChange}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
                                                        <span class="item-check-mark">{{svg "octicon-check"}}</span>
-                                                       {{svg "octicon-people" 20}} {{$repoOwnerName}}/{{.Team.Name}}
+                                                       {{ctx.AvatarUtils.Avatar .User 20}} {{template "repo/search_name" .User}}
                                                </a>
                                        {{end}}
                                {{end}}
-                       {{end}}
+                               {{if $data.TeamReviewers}}
+                                       {{if $data.Reviewers}}<div class="divider"></div>{{end}}
+                                       {{range $data.TeamReviewers}}
+                                               {{if .Team}}
+                                                       <a class="item muted {{if .Requested}}checked{{end}}" href="#" data-value="{{.ItemID}}" data-can-change="{{.CanChange}}"
+                                                               {{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
+                                                               <span class="item-check-mark">{{svg "octicon-check"}}</span>
+                                                               {{svg "octicon-people" 20}} {{$repoOwnerName}}/{{.Team.Name}}
+                                                       </a>
+                                               {{end}}
+                                       {{end}}
+                               {{end}}
+                       </div>
                </div>
        </div>
 
index 01ddab97e595c3afdd4de71552f75b592da4a2a1..7307b978702b85bcbb2d7025ec5173add54185e8 100644 (file)
   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 {