From 4d7dfe38bfbead3012a5bb2f7773a6408e943b86 Mon Sep 17 00:00:00 2001 From: forgejo-backport-action Date: Tue, 20 Jan 2026 20:15:15 +0100 Subject: [PATCH] [v14.0/forgejo] fix(ui): improve force-push layout alignment (#10950) **Backport:** https://codeberg.org/forgejo/forgejo/pulls/10939 Followup to https://codeberg.org/forgejo/forgejo/pulls/7746 Replaces https://codeberg.org/forgejo/forgejo/pulls/10938 grid layout (desktop): give the Compare button a wrapper with same height as the first text line so it stays aligned to it (and to timeline badge) inline layout (mobile): give the Compare button left margin so there's a gap between it and the text line Initial fix for grid was proposed by luisadame. Co-authored-by: Luis Co-authored-by: 0ko <0ko@noreply.codeberg.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10950 Reviewed-by: Beowulf Co-authored-by: forgejo-backport-action Co-committed-by: forgejo-backport-action --- templates/repo/issue/view_content/comments.tmpl | 4 +++- web_src/css/repo.css | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index c3cc94dfb3..bde6a0b5b2 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -580,7 +580,9 @@ }} {{if $.Issue.PullRequest.BaseRepo.Name}} - {{ctx.Locale.Tr "repo.issues.force_push_compare"}} + + {{ctx.Locale.Tr "repo.issues.force_push_compare"}} + {{end}} {{else}} diff --git a/web_src/css/repo.css b/web_src/css/repo.css index d51b340e0f..c9bd7da02f 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -886,6 +886,16 @@ citation-information .tab:not(.active) { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; + span.compare { + /* Same height as .timeline-item .badge for alignment */ + height: 34px; + } + } +} + +@media (max-width: 767.98px) { + .repository.view.issue .comment-list .timeline-item .forced-push span.compare { + margin-inline-start: 1rem; } }