From 0a0cd75071ac2e2ca36f0d89efbc14ab66d2985c Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 27 Aug 2022 22:52:00 +0200 Subject: [PATCH] Change review buttons to icons to make space for text (#20934) (#20978) 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 000000000..678b9374f --- /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 000000000..f819255cc --- /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 000000000..6b34f3373 --- /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 fdc6db2f1..2fbc5b0e1 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -13,14 +13,14 @@

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

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