From 3bee4ce24eb71dd957e251e4e9c8ac620b45552e Mon Sep 17 00:00:00 2001 From: Robert Wolff Date: Sun, 31 May 2026 10:11:17 +0200 Subject: [PATCH] fix(ui): adjust distances and remove a divider in the issue sidebar (#12786) Some minor changes: coherent distances between heading and descriptions, drop a divider between time tracking related sections. ### Test 1. Go to an issue, add some time tracking and potentially dependencies. 2. Observe improved distances with a user with and once with a user without write permission. The content of the `release-notes/.md` file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12786 Reviewed-by: 0ko <0ko@noreply.codeberg.org> --- .../view_content/sidebar/dependencies.tmpl | 2 +- .../view_content/sidebar/due_deadline.tmpl | 25 +++++++++---------- .../issue/view_content/sidebar/reference.tmpl | 3 ++- .../view_content/sidebar/timetracking.tmpl | 3 +++ 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/templates/repo/issue/view_content/sidebar/dependencies.tmpl b/templates/repo/issue/view_content/sidebar/dependencies.tmpl index 7267e39d6a..1b7fcaa846 100644 --- a/templates/repo/issue/view_content/sidebar/dependencies.tmpl +++ b/templates/repo/issue/view_content/sidebar/dependencies.tmpl @@ -1,4 +1,4 @@ -
+
{{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}} {{ctx.Locale.Tr "repo.issues.dependency.title"}}
diff --git a/templates/repo/issue/view_content/sidebar/due_deadline.tmpl b/templates/repo/issue/view_content/sidebar/due_deadline.tmpl index 0b17ece669..b37c4462a5 100644 --- a/templates/repo/issue/view_content/sidebar/due_deadline.tmpl +++ b/templates/repo/issue/view_content/sidebar/due_deadline.tmpl @@ -5,20 +5,19 @@ {{ctx.Locale.Tr "repo.issues.due_date_invalid"}}
{{if ne .Issue.DeadlineUnix 0}} -

-

-
- {{svg "octicon-calendar" 16 "tw-mr-2"}} - {{DateUtils.AbsoluteLong .Issue.DeadlineUnix}} -
-
- {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} - {{svg "octicon-pencil" 16 "tw-mr-1"}} - {{svg "octicon-trash"}} - {{end}} -
+

+
+
+ {{svg "octicon-calendar" 16 "tw-mr-2"}} + {{DateUtils.AbsoluteLong .Issue.DeadlineUnix}}
-

+
+ {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}} + {{svg "octicon-pencil" 16 "tw-mr-1"}} + {{svg "octicon-trash"}} + {{end}} +
+
{{else}}

{{ctx.Locale.Tr "repo.issues.due_date_not_set"}}

{{end}} diff --git a/templates/repo/issue/view_content/sidebar/reference.tmpl b/templates/repo/issue/view_content/sidebar/reference.tmpl index 1b02769ad1..98e2a19256 100644 --- a/templates/repo/issue/view_content/sidebar/reference.tmpl +++ b/templates/repo/issue/view_content/sidebar/reference.tmpl @@ -1,4 +1,4 @@ -
+
{{$issueReferenceLink := ""}} {{if .Issue.IsPull}} {{$issueReferenceLink = printf "%s!%d" .Issue.Repo.FullName .Issue.Index}} @@ -10,6 +10,7 @@ {{ctx.Locale.Tr "discussion.sidebar.reference"}} +

{{$issueReferenceLink}} diff --git a/templates/repo/issue/view_content/sidebar/timetracking.tmpl b/templates/repo/issue/view_content/sidebar/timetracking.tmpl index 228e2d27a7..62df3d7f38 100644 --- a/templates/repo/issue/view_content/sidebar/timetracking.tmpl +++ b/templates/repo/issue/view_content/sidebar/timetracking.tmpl @@ -48,9 +48,12 @@
{{end}} {{if .WorkingUsers}} + {{if or (not .CanUseTimetracker) (.Repository.IsArchived)}}
+ {{end}}
{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}} +

{{range $user, $trackedtime := .WorkingUsers}}