Skip to content

Commit 94c5a30

Browse files
GiteaBotwxiaoguangsilverwind
authored
Fix some UI regressions for commit list (#30920) (#30937)
Backport #30920 by wxiaoguang Close #30919 Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: silverwind <[email protected]>
1 parent b99473f commit 94c5a30

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

templates/repo/commits_list_small.tmpl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313

1414
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
1515

16-
<span class="tw-flex-1 gt-ellipsis tw-font-mono{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</span>
16+
<span class="tw-flex-1 tw-font-mono gt-ellipsis" title="{{.Summary}}">
17+
{{- RenderCommitMessageLinkSubject $.root.Context .Message $commitLink ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
18+
</span>
1719

1820
{{if IsMultilineCommitMessage .Message}}
19-
<button class="ui button js-toggle-commit-body ellipsis-button" aria-expanded="false">...</button>
20-
{{end}}
21-
{{if IsMultilineCommitMessage .Message}}
22-
<pre class="commit-body tw-hidden">{{RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx)}}</pre>
21+
<button class="ui button ellipsis-button show-panel toggle" data-panel="[data-singular-commit-body-for='{{$tag}}']">...</button>
2322
{{end}}
2423

2524
<span class="shabox tw-flex tw-items-center">
@@ -47,5 +46,10 @@
4746
</a>
4847
</span>
4948
</div>
49+
{{if IsMultilineCommitMessage .Message}}
50+
<pre class="commit-body tw-ml-[33px] tw-hidden" data-singular-commit-body-for="{{$tag}}">
51+
{{- RenderCommitBody $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.ComposeMetas ctx) -}}
52+
</pre>
53+
{{end}}
5054
{{end}}
5155
</div>

web_src/css/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ input:-webkit-autofill:active,
734734
font-weight: var(--font-weight-normal);
735735
margin: 0 6px;
736736
padding: 5px 10px;
737+
flex-shrink: 0;
737738
}
738739

739740
.ui .sha.label .shortsha {

web_src/css/repo.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,14 +2349,10 @@ tbody.commit-list {
23492349
.commit-body {
23502350
margin: 0.25em 0;
23512351
white-space: pre-wrap;
2352+
overflow-wrap: anywhere;
23522353
line-height: initial;
23532354
}
23542355

2355-
/* PR-comment */
2356-
.repository .timeline-item .commit-body {
2357-
margin-left: 45px;
2358-
}
2359-
23602356
.git-notes.top {
23612357
text-align: left;
23622358
}

0 commit comments

Comments
 (0)