From 94549bcd115e4b6da9f636293e50f65c708df681 Mon Sep 17 00:00:00 2001 From: silverwind Date: Fri, 26 Aug 2022 18:49:40 +0200 Subject: [PATCH] Change review buttons to icons to make space for text (#20934) The layout on the review code view was broken depending on length of the text. Change all three buttons to icons with tooltip to make more space for these long texts. Fixes: #20922 --- public/img/svg/gitea-join.svg | 1 + public/img/svg/gitea-split.svg | 1 + public/img/svg/gitea-whitespace.svg | 1 + templates/repo/diff/box.tmpl | 4 ++-- templates/repo/diff/new_review.tmpl | 2 +- templates/repo/diff/options_dropdown.tmpl | 5 ++--- templates/repo/diff/whitespace_dropdown.tmpl | 6 +++--- web_src/less/_base.less | 6 ++++++ web_src/svg/gitea-join.svg | 1 + web_src/svg/gitea-split.svg | 1 + web_src/svg/gitea-whitespace.svg | 1 + 11 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 public/img/svg/gitea-join.svg create mode 100644 public/img/svg/gitea-split.svg create mode 100644 public/img/svg/gitea-whitespace.svg create mode 100644 web_src/svg/gitea-join.svg create mode 100644 web_src/svg/gitea-split.svg create mode 100644 web_src/svg/gitea-whitespace.svg diff --git a/public/img/svg/gitea-join.svg b/public/img/svg/gitea-join.svg new file mode 100644 index 0000000000..678b9374f7 --- /dev/null +++ b/public/img/svg/gitea-join.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/gitea-split.svg b/public/img/svg/gitea-split.svg new file mode 100644 index 0000000000..f819255cca --- /dev/null +++ b/public/img/svg/gitea-split.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/gitea-whitespace.svg b/public/img/svg/gitea-whitespace.svg new file mode 100644 index 0000000000..6b34f33736 --- /dev/null +++ b/public/img/svg/gitea-whitespace.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 464b1359d8..35b8b3956d 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -13,14 +13,14 @@

{{.locale.Tr "repo.diff.data_not_available"}}

{{else}}
-
+
{{svg "octicon-diff" 16 "mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} -