Skip to content

Commit 75739d0

Browse files
authored
Fix styling for PR merge section when no checks (#11609)
Makes styling consistent between two cases. Also removed unnecessary double border.
1 parent 0a7c562 commit 75739d0

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

integrations/pull_merge_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func TestCantMergeWorkInProgress(t *testing.T) {
194194
req := NewRequest(t, "GET", resp.Header().Get("Location"))
195195
resp = session.MakeRequest(t, req, http.StatusOK)
196196
htmlDoc := NewHTMLParser(t, resp.Body)
197-
text := strings.TrimSpace(htmlDoc.doc.Find(".attached.header > .text.grey").Last().Text())
197+
text := strings.TrimSpace(htmlDoc.doc.Find(".attached.merge-section.no-header > .text.grey").Last().Text())
198198
assert.NotEmpty(t, text, "Can't find WIP text")
199199

200200
// remove <strong /> from lang

templates/repo/issue/view_content/pull.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
7676
<div class="content">
7777
{{template "repo/pulls/status" .}}
78-
<div class="ui {{if not $.LatestCommitStatus}}top attached header{{else}}attached merge-section segment{{end}}">
78+
<div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}}">
7979
{{if .Issue.PullRequest.HasMerged}}
8080
<div class="item text purple">
8181
{{if .Issue.PullRequest.MergedCommitID}}

web_src/less/_repository.less

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,20 @@
919919
}
920920

921921
> .merge-section {
922-
border-top: 1px solid #d4d4d5;
923922
background-color: #f7f7f7;
923+
924+
.item + .item {
925+
padding-top: .5rem;
926+
}
927+
928+
.divider {
929+
margin-left: -1rem;
930+
margin-right: -1rem;
931+
}
932+
933+
&.no-header {
934+
#avatar-arrow;
935+
}
924936
}
925937

926938
.markdown {

0 commit comments

Comments
 (0)