Skip to content

Commit 3ff4a69

Browse files
GiteaBotsilverwindwxiaoguang
authored
Prevent flash of dropdown menu on labels list (#30215) (#30216)
Backport #30215 by @silverwind On the labels list, This `left` class caused the dropdown content to flash on page load until JS had hidden it. Remove it as I see no purpose to it. <img width="215" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/9e1de97f-dd89-41e0-9229-5c4a786ba762"> Co-authored-by: silverwind <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
1 parent 98a81be commit 3ff4a69

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

templates/repo/issue/labels/label_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
99
</span>
1010
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
11-
<div class="left menu">
11+
<div class="menu">
1212
<a class="{{if or (eq .SortType "alphabetically") (not .SortType)}}active {{end}}item" href="?sort=alphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
1313
<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&state={{$.State}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
1414
<a class="{{if eq .SortType "leastissues"}}active {{end}}item" href="?sort=leastissues&state={{$.State}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>

web_src/css/modules/header.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ h4.ui.header .sub.header {
135135
font-weight: var(--font-weight-normal);
136136
}
137137

138+
/* open dropdown menus to the left in right-attached headers */
139+
.ui.attached.header > .ui.right .ui.dropdown .menu {
140+
right: 0;
141+
left: auto;
142+
}
143+
138144
/* if a .top.attached.header is followed by a .segment, add some margin */
139145
.ui.segments + .ui.top.attached.header,
140146
.ui.attached.segment + .ui.top.attached.header {

0 commit comments

Comments
 (0)