From fd069a6e0f554ec3aa2cb73462910cab29ff81ce Mon Sep 17 00:00:00 2001 From: metiftikci Date: Thu, 26 Dec 2024 20:51:34 +0000 Subject: [PATCH 1/5] fix toggle commit body button ui when latest commit message is long --- templates/repo/commit_statuses.tmpl | 4 ++-- web_src/css/repo.css | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index f451ac06a1a9e..c525d604081b0 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,10 +1,10 @@ {{if .Statuses}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} - + {{template "repo/commit_status" .Status}} {{else}} - + {{template "repo/commit_status" .Status}} {{end}} diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 6fdc9ec2a88e2..7d0d1a33f25a9 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -1701,6 +1701,14 @@ tbody.commit-list { white-space: nowrap; } +.latest-commit .commit-statuses { + margin-right: 6px; +} + +.latest-commit .message-wrapper { + max-width: calc(100% - 2.5rem); +} + /* in the commit list, messages can wrap so we can use inline */ .commit-list .message-wrapper { display: inline; From 2050ea2a20eede1ca14ef0c01326422189e98df7 Mon Sep 17 00:00:00 2001 From: metiftikci Date: Fri, 27 Dec 2024 16:42:06 +0000 Subject: [PATCH 2/5] use gap on latest commit ui instead of margin --- templates/repo/commit_statuses.tmpl | 4 ++-- templates/repo/latest_commit.tmpl | 4 ++-- web_src/css/repo.css | 8 +++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index c525d604081b0..d176b388b2125 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,10 +1,10 @@ {{if .Statuses}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} - + {{template "repo/commit_status" .Status}} {{else}} - + {{template "repo/commit_status" .Status}} {{end}} diff --git a/templates/repo/latest_commit.tmpl b/templates/repo/latest_commit.tmpl index 34a5df8f7762e..b815c7af700d9 100644 --- a/templates/repo/latest_commit.tmpl +++ b/templates/repo/latest_commit.tmpl @@ -2,7 +2,7 @@ … {{else}} {{if .LatestCommitUser}} - {{ctx.AvatarUtils.Avatar .LatestCommitUser 24 "tw-mr-1"}} + {{ctx.AvatarUtils.Avatar .LatestCommitUser 24}} {{if and .LatestCommitUser.FullName DefaultShowFullName}} {{.LatestCommitUser.FullName}} {{else}} @@ -10,7 +10,7 @@ {{end}} {{else}} {{if .LatestCommit.Author}} - {{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24 "tw-mr-1"}} + {{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24}} {{.LatestCommit.Author.Name}} {{end}} {{end}} diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 7d0d1a33f25a9..539c223b63304 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -117,6 +117,7 @@ td .commit-summary { .latest-commit { display: flex; flex: 1; + gap: 6px; align-items: center; overflow: hidden; text-overflow: ellipsis; @@ -126,9 +127,6 @@ td .commit-summary { .latest-commit .sha { display: none; } - .latest-commit .commit-summary { - margin-left: 8px; - } } .repo-path { @@ -1701,8 +1699,8 @@ tbody.commit-list { white-space: nowrap; } -.latest-commit .commit-statuses { - margin-right: 6px; +.latest-commit .sha.label { + margin: 0; } .latest-commit .message-wrapper { From eebcb418e92c6e5246f4061eec075d758a291d20 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 28 Dec 2024 04:35:38 +0800 Subject: [PATCH 3/5] fix --- templates/repo/commit_statuses.tmpl | 4 ++-- web_src/css/repo.css | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index d176b388b2125..39cdc59d73691 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,10 +1,10 @@ {{if .Statuses}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} - + {{template "repo/commit_status" .Status}} {{else}} - + {{template "repo/commit_status" .Status}} {{end}} diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 5b57f3ff96744..b5dc19de198bd 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -117,13 +117,18 @@ td .commit-summary { .latest-commit { display: flex; flex: 1; - gap: 6px; align-items: center; overflow: hidden; text-overflow: ellipsis; gap: 0.25em; } +@media (max-width: 767.98px) { + .latest-commit .commit-id-short { + display: none; + } +} + .repo-path { display: flex; overflow-wrap: anywhere; @@ -1671,10 +1676,6 @@ tbody.commit-list { white-space: nowrap; } -.latest-commit .sha.label { - margin: 0; -} - .latest-commit .message-wrapper { max-width: calc(100% - 2.5rem); } From 4437a736e03f731231c2d809e7a05df389a1df5b Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 28 Dec 2024 04:37:27 +0800 Subject: [PATCH 4/5] remove unused classes --- templates/repo/commit_statuses.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index 39cdc59d73691..151701741c6d7 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,10 +1,10 @@ {{if .Statuses}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} - + {{template "repo/commit_status" .Status}} {{else}} - + {{template "repo/commit_status" .Status}} {{end}} From e2462f24448fc0ea3825b5a4b4615679906ab388 Mon Sep 17 00:00:00 2001 From: metiftikci Date: Sat, 28 Dec 2024 14:54:11 +0000 Subject: [PATCH 5/5] make icon inline --- templates/repo/commit_statuses.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index 151701741c6d7..a6f75584a31f4 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,10 +1,10 @@ {{if .Statuses}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} - + {{template "repo/commit_status" .Status}} {{else}} - + {{template "repo/commit_status" .Status}} {{end}}