Skip to content

Commit 58abd4f

Browse files
authored
Improve issue list layout (#26983)
Align everything with a new layout. * Use "baseline" for some special elements, the "flex-item-icon" is for the issue list only at the moment and I think it should be general enough now (but not using "flex-item-leading" anymore in this case). * Make the labels stretch themselves.
1 parent 049b9f3 commit 58abd4f

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

templates/shared/issuelist.tmpl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
{{$approvalCounts := .ApprovalCounts}}
33
{{range .Issues}}
44
<div class="flex-item">
5-
<div class="flex-item-leading">
5+
6+
<div class="flex-item-icon">
67
{{if $.CanWriteIssuesOrPulls}}
7-
<div class="flex-item-icon">
8-
<input type="checkbox" autocomplete="off" class="issue-checkbox gt-mr-4" data-issue-id={{.ID}} aria-label="{{$.locale.Tr "repo.issues.action_check"}} &quot;{{.Title}}&quot;">
9-
</div>
8+
<input type="checkbox" autocomplete="off" class="issue-checkbox gt-mr-4" data-issue-id={{.ID}} aria-label="{{$.locale.Tr "repo.issues.action_check"}} &quot;{{.Title}}&quot;">
109
{{end}}
11-
<div class="flex-item-icon">
12-
{{template "shared/issueicon" .}}
13-
</div>
10+
{{template "shared/issueicon" .}}
1411
</div>
12+
1513
<div class="flex-item-main">
1614
<div class="flex-item-header">
1715
<div class="flex-item-title">

web_src/css/repo/issue-list.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@
3333
}
3434
}
3535

36+
#issue-list .flex-item-title .labels-list {
37+
display: flex;
38+
gap: 0.25em;
39+
}
40+
41+
#issue-list .flex-item-title .labels-list a {
42+
display: flex;
43+
text-decoration: none;
44+
}
45+
46+
#issue-list .flex-item-title .labels-list .label {
47+
padding: 0 6px;
48+
margin: 0;
49+
min-height: 20px;
50+
}
51+
3652
#issue-list .flex-item-body .branches {
3753
display: inline-flex;
3854
}

web_src/css/shared/flex-list.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
}
3535

3636
.flex-item .flex-item-icon {
37-
display: flex;
38-
align-items: center;
39-
height: 20px; /* match the default flex-item-title height */
37+
align-self: baseline; /* mainly used by the issue list, to align the leading icon with the title */
38+
}
39+
40+
.flex-item .flex-item-icon + .flex-item-main {
41+
align-self: baseline;
4042
}
4143

4244
.flex-item .flex-item-trailing {
@@ -59,7 +61,6 @@
5961
font-weight: var(--font-weight-semibold);
6062
word-break: break-word;
6163
min-width: 0;
62-
min-height: 20px;
6364
}
6465

6566
.flex-item .flex-item-title a {

0 commit comments

Comments
 (0)