From c19222b22f728f3ddad397a3801e10da238ac6c3 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sun, 7 Jul 2024 03:21:58 +0000 Subject: [PATCH] ui: improve button gap consistency in repos (#4365) Improve UI in a few areas in a similar way to https://codeberg.org/forgejo/forgejo/commit/dc0d3a40ab008f5ff20ad50d8b4a58277595f2fa. Ensure consistent 0.5em gaps in button rows, make buttons have more consistent horizontal paddings for better clickability. Preview: https://codeberg.org/attachments/cfca200a-3b68-4ba8-9876-75cea7822a00 https://codeberg.org/attachments/aaa5d387-919b-45af-8854-6d0f5273125f https://codeberg.org/attachments/989225b7-b1dd-491d-bf76-7e4a962ea54e Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4365 Reviewed-by: Earl Warren Reviewed-by: Gusted --- templates/repo/diff/box.tmpl | 4 ++-- templates/repo/diff/conversation.tmpl | 6 +++--- templates/repo/header.tmpl | 2 +- templates/repo/issue/view_content/conversation.tmpl | 4 ++-- web_src/css/repo.css | 9 ++++----- web_src/css/repo/header.css | 1 - 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 71154f976..230e49752 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -23,7 +23,7 @@ {{end}} -
+
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}}
-
+
{{if $showFileViewToggle}}
diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index ef92f3bdf..c80d999f4 100644 --- a/templates/repo/diff/conversation.tmpl +++ b/templates/repo/diff/conversation.tmpl @@ -37,8 +37,8 @@ {{template "repo/diff/comments" dict "root" $ "comments" .comments}}
-
-
+
+
@@ -56,7 +56,7 @@ {{end}} {{if and $.SignedUserID (not $.Repository.IsArchived)}} - {{end}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index d8c53d08b..e81e65bc7 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -35,7 +35,7 @@
{{if not (or .IsBeingCreated .IsBroken)}} -
+
{{if $.RepoTransfer}}
{{$.CsrfTokenHtml}} diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl index 8e37b5487..2526e5c84 100644 --- a/templates/repo/issue/view_content/conversation.tmpl +++ b/templates/repo/issue/view_content/conversation.tmpl @@ -115,7 +115,7 @@
{{end}}
-
+
{{if and $.CanMarkConversation $isNotPending}} {{end}} {{if and $.SignedUserID (not $.Repository.IsArchived)}} - {{end}} diff --git a/web_src/css/repo.css b/web_src/css/repo.css index e90e0ec4f..1a901e07a 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -601,7 +601,7 @@ td .commit-summary { align-items: center; } -.repository.view.issue .button-row, +.issue-title .button-row, .repository.releases .button-row { display: flex; } @@ -610,7 +610,7 @@ td .commit-summary { .repository.view.issue .issue-title { flex-direction: column; } - .repository.view.issue .button-row { + .issue-title .button-row { width: 100%; margin-top: .5rem; justify-content: space-between; @@ -1539,7 +1539,6 @@ td .commit-summary { .diff-detail-actions { display: flex; align-items: center; - gap: 0.25em; justify-content: end; } @@ -1574,7 +1573,7 @@ td .commit-summary { } .repository .diff-detail-box .ui.button { - padding: 0 12px; + padding: 0 1.125em; height: 30px; } @@ -1596,7 +1595,7 @@ td .commit-summary { } .repository .diff-box .header:not(.resolved-placeholder) .button { - padding: 0 12px; + padding: 0 1.125em; flex: 0 0 auto; margin-right: 0; height: 30px; diff --git a/web_src/css/repo/header.css b/web_src/css/repo/header.css index 55e704ed1..9da5fe6ac 100644 --- a/web_src/css/repo/header.css +++ b/web_src/css/repo/header.css @@ -33,7 +33,6 @@ display: flex; flex-flow: row wrap; word-break: keep-all; - gap: 0.25em; } .repo-buttons .ui.labeled.button > .label:hover {