Skip to content

Commit 6999a88

Browse files
authored
Pulse page improvements (#30149)
1. add border-radius and spacing to bars 2. use tailwind background classes 3. Add more space around activity list headers <img width="983" alt="Screenshot 2024-03-27 at 23 40 54" src="https://github.com/go-gitea/gitea/assets/115237/70f72c30-e69f-4ecb-882f-32b8bc94d638"> <img width="1020" alt="Screenshot 2024-03-27 at 23 41 02" src="https://github.com/go-gitea/gitea/assets/115237/a35dbbda-515c-40b0-938a-d759f9686b8e">
1 parent ce130ae commit 6999a88

File tree

6 files changed

+33
-16
lines changed

6 files changed

+33
-16
lines changed

templates/repo/pulse.tmpl

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525
<div class="column">
2626
{{if gt .Activity.ActivePRCount 0}}
2727
<div class="stats-table">
28-
<a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}{{if ne .Activity.MergedPRPerc 0}}%{{end}}"></a>
29-
<a href="#proposed-pull-requests" class="table-cell tiny background green"></a>
28+
{{if gt .Activity.MergedPRPerc 0}}
29+
<a href="#merged-pull-requests" class="table-cell tiny tw-bg-purple" style="width: {{.Activity.MergedPRPerc}}%"></a>
30+
{{end}}
31+
<a href="#proposed-pull-requests" class="table-cell tiny tw-bg-green"></a>
3032
</div>
3133
{{else}}
3234
<div class="stats-table">
33-
<a class="table-cell tiny background light grey"></a>
35+
<a class="table-cell tiny tw-bg-grey"></a>
3436
</div>
3537
{{end}}
3638
{{ctx.Locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount}}
@@ -40,8 +42,10 @@
4042
<div class="column">
4143
{{if gt .Activity.ActiveIssueCount 0}}
4244
<div class="stats-table">
43-
<a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}{{if ne .Activity.ClosedIssuePerc 0}}%{{end}}"></a>
44-
<a href="#new-issues" class="table-cell tiny background green"></a>
45+
{{if gt .Activity.ClosedIssuePerc 0}}
46+
<a href="#closed-issues" class="table-cell tiny tw-bg-red" style="width: {{.Activity.ClosedIssuePerc}}%"></a>
47+
{{end}}
48+
<a href="#new-issues" class="table-cell tiny tw-bg-green"></a>
4549
</div>
4650
{{else}}
4751
<div class="stats-table">
@@ -108,7 +112,7 @@
108112
{{end}}
109113

110114
{{if gt .Activity.PublishedReleaseCount 0}}
111-
<h4 class="divider divider-text tw-normal-case" id="published-releases">
115+
<h4 class="divider divider-text" id="published-releases">
112116
{{svg "octicon-tag" 16 "tw-mr-2"}}
113117
{{ctx.Locale.Tr "repo.activity.title.releases_published_by"
114118
(ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount)
@@ -130,7 +134,7 @@
130134
{{end}}
131135

132136
{{if gt .Activity.MergedPRCount 0}}
133-
<h4 class="divider divider-text tw-normal-case" id="merged-pull-requests">
137+
<h4 class="divider divider-text" id="merged-pull-requests">
134138
{{svg "octicon-git-pull-request" 16 "tw-mr-2"}}
135139
{{ctx.Locale.Tr "repo.activity.title.prs_merged_by"
136140
(ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount)
@@ -149,7 +153,7 @@
149153
{{end}}
150154

151155
{{if gt .Activity.OpenedPRCount 0}}
152-
<h4 class="divider divider-text tw-normal-case" id="proposed-pull-requests">
156+
<h4 class="divider divider-text" id="proposed-pull-requests">
153157
{{svg "octicon-git-branch" 16 "tw-mr-2"}}
154158
{{ctx.Locale.Tr "repo.activity.title.prs_opened_by"
155159
(ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount)
@@ -168,7 +172,7 @@
168172
{{end}}
169173

170174
{{if gt .Activity.ClosedIssueCount 0}}
171-
<h4 class="divider divider-text tw-normal-case" id="closed-issues">
175+
<h4 class="divider divider-text" id="closed-issues">
172176
{{svg "octicon-issue-closed" 16 "tw-mr-2"}}
173177
{{ctx.Locale.Tr "repo.activity.title.issues_closed_from"
174178
(ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount)
@@ -187,7 +191,7 @@
187191
{{end}}
188192

189193
{{if gt .Activity.OpenedIssueCount 0}}
190-
<h4 class="divider divider-text tw-normal-case" id="new-issues">
194+
<h4 class="divider divider-text" id="new-issues">
191195
{{svg "octicon-issue-opened" 16 "tw-mr-2"}}
192196
{{ctx.Locale.Tr "repo.activity.title.issues_created_by"
193197
(ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount)
@@ -206,7 +210,7 @@
206210
{{end}}
207211

208212
{{if gt .Activity.UnresolvedIssueCount 0}}
209-
<h4 class="divider divider-text tw-normal-case" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}">
213+
<h4 class="divider divider-text" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}">
210214
{{svg "octicon-comment-discussion" 16 "tw-mr-2"}}
211215
{{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}
212216
</h4>

web_src/css/dashboard.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
.dashboard.feeds .context.user.menu .ui.header,
88
.dashboard.issues .context.user.menu .ui.header {
99
font-size: 1rem;
10-
text-transform: none;
1110
}
1211

1312
.dashboard.feeds .filter.menu,

web_src/css/modules/divider.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
margin: 10px 0;
33
height: 0;
44
font-weight: var(--font-weight-medium);
5-
text-transform: uppercase;
65
color: var(--color-text);
76
font-size: 1rem;
87
width: 100%;
98
}
109

10+
h4.divider {
11+
margin-top: 1.25rem;
12+
margin-bottom: 1.25rem;
13+
}
14+
1115
.divider:not(.divider-text) {
1216
border-top: 1px solid var(--color-secondary);
1317
}

web_src/css/modules/header.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
font-family: var(--fonts-regular);
1010
font-weight: var(--font-weight-medium);
1111
line-height: 1.28571429;
12-
text-transform: none;
1312
}
1413

1514
.ui.header:first-child {

web_src/css/modules/label.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
background: var(--color-label-bg);
1111
color: var(--color-label-text);
1212
padding: 0.3em 0.5em;
13-
text-transform: none;
1413
font-size: 0.85714286rem;
1514
font-weight: var(--font-weight-medium);
1615
border: 0 solid transparent;

web_src/css/repo.css

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,14 +2304,26 @@ td .commit-summary {
23042304
.stats-table {
23052305
display: table;
23062306
width: 100%;
2307+
margin: 6px 0;
2308+
border-spacing: 2px;
23072309
}
23082310

23092311
.stats-table .table-cell {
23102312
display: table-cell;
23112313
}
23122314

23132315
.stats-table .table-cell.tiny {
2314-
height: 0.5em;
2316+
height: 8px;
2317+
}
2318+
2319+
.stats-table .table-cell:first-child {
2320+
border-top-left-radius: 4px;
2321+
border-bottom-left-radius: 4px;
2322+
}
2323+
2324+
.stats-table .table-cell:last-child {
2325+
border-top-right-radius: 4px;
2326+
border-bottom-right-radius: 4px;
23152327
}
23162328

23172329
.labels-list {

0 commit comments

Comments
 (0)