From 0e1bafdff3c75fa25340b85eff44ab1d012835b4 Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Wed, 16 Jul 2025 18:29:51 +0200 Subject: [PATCH] feat(ui): make 'Reference' in the issue sidebar more uniform (#8506) This breaks the reference's contents into a new line to make more space for the contents, and because using a single column to present information is something we do not do in the sidebar. Although further changes to other components may be required so that the sidebar looks uniform in its entirety, this small tweak is a small start. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8506 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Gusted Co-authored-by: Panagiotis "Ivory" Vasilopoulos Co-committed-by: Panagiotis "Ivory" Vasilopoulos --- options/locale/locale_en-US.ini | 1 - options/locale_next/locale_en-US.json | 1 + .../issue/view_content/sidebar/reference.tmpl | 15 +++++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index cce62685bf..c01d1464cb 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1882,7 +1882,6 @@ issues.content_history.created = created issues.content_history.delete_from_history = Delete from history issues.content_history.delete_from_history_confirm = Delete from history? issues.content_history.options = Options -issues.reference_link = Reference: %s issues.blocked_by_user = You cannot create issues in this repository because you are blocked by the repository owner. comment.blocked_by_user = Commenting is not possible because you are blocked by the repository owner or the author. issues.reopen.blocked_by_user = You cannot reopen this issue because you are blocked by the repository owner or the poster of this issue. diff --git a/options/locale_next/locale_en-US.json b/options/locale_next/locale_en-US.json index 0a3e62e942..3c877ff627 100644 --- a/options/locale_next/locale_en-US.json +++ b/options/locale_next/locale_en-US.json @@ -99,6 +99,7 @@ "repo.diff.commit.next-short": "Next", "repo.diff.commit.previous-short": "Prev", "discussion.locked": "This discussion has been locked. Commenting is limited to contributors.", + "discussion.sidebar.reference": "Reference", "editor.textarea.tab_hint": "Line already indented. Press Tab again or Escape to leave the editor.", "editor.textarea.shift_tab_hint": "No indentation on this line. Press Shift + Tab again or Escape to leave the editor.", "admin.dashboard.cleanup_offline_runners": "Cleanup offline runners", diff --git a/templates/repo/issue/view_content/sidebar/reference.tmpl b/templates/repo/issue/view_content/sidebar/reference.tmpl index bbbc099558..1b24531b7b 100644 --- a/templates/repo/issue/view_content/sidebar/reference.tmpl +++ b/templates/repo/issue/view_content/sidebar/reference.tmpl @@ -1,7 +1,14 @@ -
+
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} -
- {{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}} - + + + {{ctx.Locale.Tr "discussion.sidebar.reference"}} + + +
+
+ {{$issueReferenceLink}} + +