From 10a9b6b8063a48fdd90c5753a1c61b9fa39c5449 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 10 May 2024 22:36:06 +0800 Subject: [PATCH] Fix some UI regressions for commit list (#30920) (#30937) Backport #30920 by wxiaoguang Close #30919 Co-authored-by: wxiaoguang Co-authored-by: silverwind (cherry picked from commit 94c5a30c8bd2ae78ffd7bd3b39bee019c531e1e7) --- templates/repo/commits_list_small.tmpl | 14 +++++++++----- web_src/css/base.css | 1 + web_src/css/repo.css | 6 +----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl index 6ca6dd5cdc..4c67319b8c 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -13,13 +13,12 @@ {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} - {{RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}} + + {{- RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}} + {{if IsMultilineCommitMessage .Message}} - - {{end}} - {{if IsMultilineCommitMessage .Message}} -
{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}
+ {{end}} @@ -47,5 +46,10 @@ + {{if IsMultilineCommitMessage .Message}} +
+		{{- RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
+	
+ {{end}} {{end}} diff --git a/web_src/css/base.css b/web_src/css/base.css index 0ab923594c..a4ef1e8747 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -976,6 +976,7 @@ input:-webkit-autofill:active, font-weight: var(--font-weight-normal); margin: 0 6px; padding: 5px 10px; + flex-shrink: 0; } .ui .sha.label .shortsha { diff --git a/web_src/css/repo.css b/web_src/css/repo.css index eadd200241..388360c998 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -2588,14 +2588,10 @@ tbody.commit-list { .commit-body { margin: 0.25em 0; white-space: pre-wrap; + overflow-wrap: anywhere; line-height: initial; } -/* PR-comment */ -.repository .timeline-item .commit-body { - margin-left: 45px; -} - .git-notes.top { text-align: left; }