From b8f65234bc23fb31de2b2eb8e5d1352dcb1241f8 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 10 May 2024 20:58:05 +0800 Subject: [PATCH] Fix some UI regressions for commit list (#30920) Close #30919 --------- Co-authored-by: silverwind (cherry picked from commit 080486e47dba7ed767707fb0a2939677dfbcb0e3) --- 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 3d91586934..94be1ef610 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -898,6 +898,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 ec1f964909..e58525af0f 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -2487,14 +2487,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; }