Skip to content

Commit

Permalink
Fix styling for PR merge section when no checks (#11609)
Browse files Browse the repository at this point in the history
Makes styling consistent between two cases. Also removed unnecessary double border.
  • Loading branch information
CirnoT authored May 25, 2020
1 parent 0a7c562 commit 75739d0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integrations/pull_merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func TestCantMergeWorkInProgress(t *testing.T) {
req := NewRequest(t, "GET", resp.Header().Get("Location"))
resp = session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body)
text := strings.TrimSpace(htmlDoc.doc.Find(".attached.header > .text.grey").Last().Text())
text := strings.TrimSpace(htmlDoc.doc.Find(".attached.merge-section.no-header > .text.grey").Last().Text())
assert.NotEmpty(t, text, "Can't find WIP text")

// remove <strong /> from lang
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/view_content/pull.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
<div class="content">
{{template "repo/pulls/status" .}}
<div class="ui {{if not $.LatestCommitStatus}}top attached header{{else}}attached merge-section segment{{end}}">
<div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}}">
{{if .Issue.PullRequest.HasMerged}}
<div class="item text purple">
{{if .Issue.PullRequest.MergedCommitID}}
Expand Down
14 changes: 13 additions & 1 deletion web_src/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,20 @@
}

> .merge-section {
border-top: 1px solid #d4d4d5;
background-color: #f7f7f7;

.item + .item {
padding-top: .5rem;
}

.divider {
margin-left: -1rem;
margin-right: -1rem;
}

&.no-header {
#avatar-arrow;
}
}

.markdown {
Expand Down

0 comments on commit 75739d0

Please sign in to comment.