From 6999a88fd9bef6baa0a8cc5f63e419079611fc9b Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 14 Apr 2024 11:21:16 +0200 Subject: [PATCH] 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 Screenshot 2024-03-27 at 23 40 54 Screenshot 2024-03-27 at 23 41 02 --- templates/repo/pulse.tmpl | 26 +++++++++++++++----------- web_src/css/dashboard.css | 1 - web_src/css/modules/divider.css | 6 +++++- web_src/css/modules/header.css | 1 - web_src/css/modules/label.css | 1 - web_src/css/repo.css | 14 +++++++++++++- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl index cfb3ec1d3d..bc25563d48 100644 --- a/templates/repo/pulse.tmpl +++ b/templates/repo/pulse.tmpl @@ -25,12 +25,14 @@
{{if gt .Activity.ActivePRCount 0}}
- - + {{if gt .Activity.MergedPRPerc 0}} + + {{end}} +
{{else}}
- +
{{end}} {{ctx.Locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount}} @@ -40,8 +42,10 @@
{{if gt .Activity.ActiveIssueCount 0}}
- - + {{if gt .Activity.ClosedIssuePerc 0}} + + {{end}} +
{{else}}
@@ -108,7 +112,7 @@ {{end}} {{if gt .Activity.PublishedReleaseCount 0}} -

+

{{svg "octicon-tag" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.activity.title.releases_published_by" (ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) @@ -130,7 +134,7 @@ {{end}} {{if gt .Activity.MergedPRCount 0}} -

+

{{svg "octicon-git-pull-request" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.activity.title.prs_merged_by" (ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) @@ -149,7 +153,7 @@ {{end}} {{if gt .Activity.OpenedPRCount 0}} -

+

{{svg "octicon-git-branch" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.activity.title.prs_opened_by" (ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) @@ -168,7 +172,7 @@ {{end}} {{if gt .Activity.ClosedIssueCount 0}} -

+

{{svg "octicon-issue-closed" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.activity.title.issues_closed_from" (ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) @@ -187,7 +191,7 @@ {{end}} {{if gt .Activity.OpenedIssueCount 0}} -

+

{{svg "octicon-issue-opened" 16 "tw-mr-2"}} {{ctx.Locale.Tr "repo.activity.title.issues_created_by" (ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) @@ -206,7 +210,7 @@ {{end}} {{if gt .Activity.UnresolvedIssueCount 0}} -

+

{{svg "octicon-comment-discussion" 16 "tw-mr-2"}} {{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}

diff --git a/web_src/css/dashboard.css b/web_src/css/dashboard.css index d61e0c1cf2..0962215ac6 100644 --- a/web_src/css/dashboard.css +++ b/web_src/css/dashboard.css @@ -7,7 +7,6 @@ .dashboard.feeds .context.user.menu .ui.header, .dashboard.issues .context.user.menu .ui.header { font-size: 1rem; - text-transform: none; } .dashboard.feeds .filter.menu, diff --git a/web_src/css/modules/divider.css b/web_src/css/modules/divider.css index 48560bd3d9..acc8408f37 100644 --- a/web_src/css/modules/divider.css +++ b/web_src/css/modules/divider.css @@ -2,12 +2,16 @@ margin: 10px 0; height: 0; font-weight: var(--font-weight-medium); - text-transform: uppercase; color: var(--color-text); font-size: 1rem; width: 100%; } +h4.divider { + margin-top: 1.25rem; + margin-bottom: 1.25rem; +} + .divider:not(.divider-text) { border-top: 1px solid var(--color-secondary); } diff --git a/web_src/css/modules/header.css b/web_src/css/modules/header.css index 05381e1185..9cec5fcbe6 100644 --- a/web_src/css/modules/header.css +++ b/web_src/css/modules/header.css @@ -9,7 +9,6 @@ font-family: var(--fonts-regular); font-weight: var(--font-weight-medium); line-height: 1.28571429; - text-transform: none; } .ui.header:first-child { diff --git a/web_src/css/modules/label.css b/web_src/css/modules/label.css index 0512c5fddb..32e772ea5b 100644 --- a/web_src/css/modules/label.css +++ b/web_src/css/modules/label.css @@ -10,7 +10,6 @@ background: var(--color-label-bg); color: var(--color-label-text); padding: 0.3em 0.5em; - text-transform: none; font-size: 0.85714286rem; font-weight: var(--font-weight-medium); border: 0 solid transparent; diff --git a/web_src/css/repo.css b/web_src/css/repo.css index c579745238..edb3bc2e87 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -2304,6 +2304,8 @@ td .commit-summary { .stats-table { display: table; width: 100%; + margin: 6px 0; + border-spacing: 2px; } .stats-table .table-cell { @@ -2311,7 +2313,17 @@ td .commit-summary { } .stats-table .table-cell.tiny { - height: 0.5em; + height: 8px; +} + +.stats-table .table-cell:first-child { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; +} + +.stats-table .table-cell:last-child { + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; } .labels-list {