Skip to content

Commit ac3c467

Browse files
authored
Fix styling and padding for commit list on PR view (#11588)
* Fix styling and padding for commit list on PR view * fix bold on author
1 parent 31df012 commit ac3c467

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

templates/repo/commits_list_small.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{{ $r:= List .Commits}}
22
{{ $index := 0}}
3+
<div class="timeline-item commits-list">
34
{{range $r}}
45
{{ $tag := printf "%s-%d" $.HashTag $index }}
56
{{ $index = Add $index 1}}
6-
<div class="timeline-item event small-line-spacing" id="{{$tag}}">
7+
<div class="singular-commit" id="{{$tag}}">
78
<span class="badge badge-commit">{{svg "octicon-git-commit" 16}}</span>
89
{{if .User}}
910
<a class="ui avatar image" href="{{AppSubUrl}}/{{.User.Name}}"><img src="{{.User.RelAvatarLink}}" alt=""/></a>
@@ -42,7 +43,7 @@
4243

4344
<span class="message-wrapper">
4445
{{ $commitLink:= printf "%s/%s/%s/commit/%s" AppSubUrl $.Issue.PullRequest.BaseRepo.OwnerName $.Issue.PullRequest.BaseRepo.Name .ID }}
45-
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message ($.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.Issue.PullRequest.BaseRepo.ComposeMetas}}</span>
46+
<span class="mono commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message ($.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.Issue.PullRequest.BaseRepo.ComposeMetas}}</span>
4647
</span>
4748
{{if IsMultilineCommitMessage .Message}}
4849
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
@@ -55,3 +56,4 @@
5556
{{end}}
5657
</div>
5758
{{end}}
59+
</div>

templates/repo/issue/view_content/comments.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@
602602
<img src="{{.Poster.RelAvatarLink}}">
603603
</a>
604604
<span class="text grey">
605-
<a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
605+
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
606606
{{ if .IsForcePush }}
607607
{{$.i18n.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr | Safe}}
608608
{{else}}

web_src/less/_repository.less

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,11 +751,11 @@
751751
}
752752
}
753753

754-
&:first-child {
754+
&:first-child:not(.commit) {
755755
padding-top: 0 !important;
756756
}
757757

758-
&:last-child {
758+
&:last-child:not(.commit) {
759759
padding-bottom: 0 !important;
760760
}
761761

@@ -807,8 +807,9 @@
807807
line-height: 30px;
808808
}
809809

810-
&.event.small-line-spacing {
811-
padding: 2px 0 0 15px;
810+
&.commits-list {
811+
padding-left: 15px;
812+
padding-top: 0;
812813
}
813814

814815
&.event > .commit-status-link {

0 commit comments

Comments
 (0)