Skip to content

Commit fc29a40

Browse files
silverwindandreynering
authored andcommitted
More tweaks to repo top panel (#2267)
* More tweaks to repo top panel * undo hiding of compare button on master * attempt to fix ci issue * another ci attempt
1 parent 29f3a6e commit fc29a40

File tree

5 files changed

+19
-23
lines changed

5 files changed

+19
-23
lines changed

integrations/pull_create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo, branch strin
1919

2020
// Click the little green button to create a pull
2121
htmlDoc := NewHTMLParser(t, resp.Body)
22-
link, exists := htmlDoc.doc.Find("button.ui.green.small.button").Parent().Attr("href")
22+
link, exists := htmlDoc.doc.Find("button.ui.green.tiny.compact.button").Parent().Attr("href")
2323
assert.True(t, exists, "The template has changed")
2424
if branch != "master" {
2525
link = strings.Replace(link, ":master", ":"+branch, 1)

public/css/index.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,6 @@ footer .ui.language .menu {
12901290
margin-bottom: 20px;
12911291
}
12921292
.repository #clone-panel {
1293-
margin-top: -8px;
12941293
margin-left: 5px;
12951294
width: 350px;
12961295
}
@@ -1318,6 +1317,10 @@ footer .ui.language .menu {
13181317
.repository.file.list .choose.reference .header .icon {
13191318
font-size: 1.4em;
13201319
}
1320+
.repository.file.list .repo-path .section,
1321+
.repository.file.list .repo-path .divider {
1322+
display: inline;
1323+
}
13211324
.repository.file.list #file-buttons {
13221325
font-weight: normal;
13231326
}

public/less/_repository.less

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
}
134134

135135
#clone-panel {
136-
margin-top: -8px;
137136
margin-left: 5px;
138137
width: 350px;
139138

@@ -167,6 +166,13 @@
167166
font-size: 1.4em;
168167
}
169168
}
169+
170+
.repo-path {
171+
.section, .divider {
172+
display: inline;
173+
}
174+
}
175+
170176
#file-buttons {
171177
font-weight: normal;
172178
.ui.button {

templates/repo/branch_dropdown.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="fitted item choose reference">
22
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
3-
<div class="ui basic small button">
3+
<div class="ui basic compact tiny button">
44
<span class="text">
55
<i class="octicon octicon-git-branch"></i>
66
{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:

templates/repo/home.tmpl

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,14 @@
1111
{{if .PullRequestCtx.Allowed}}
1212
<div class="fitted item">
1313
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{if .SignedUser.HasForkedRepo .BaseRepo.ID }}{{.SignedUser.Name}}:{{end}}{{.BranchName}}">
14-
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
14+
<button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
1515
</a>
1616
</div>
1717
{{end}}
1818
{{template "repo/branch_dropdown" .}}
19-
<div class="fitted item">
20-
<span class="ui breadcrumb">
21-
<a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 30}}</a>
22-
{{ $n := len .TreeNames}}
23-
{{ $l := Subtract $n 1}}
24-
{{range $i, $v := .TreeNames}}
25-
<span class="divider"> / </span>
26-
{{if eq $i $l}}
27-
<span class="active section">{{EllipsisString $v 30}}</span>
28-
{{else}}
29-
{{ $p := index $.Paths $i}}
30-
<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>
31-
{{end}}
32-
{{end}}
33-
</span>
34-
</div>
19+
{{ $n := len .TreeNames}}
20+
{{ $l := Subtract $n 1}}
21+
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
3522
<div class="right fitted item">
3623
{{if .Repository.CanEnableEditor}}
3724
<div id="file-buttons" class="ui tiny blue buttons">
@@ -48,9 +35,9 @@
4835
</div>
4936
{{end}}
5037

51-
<!-- Only show colne panel in repository home page -->
38+
<!-- Only show clone panel in repository home page -->
5239
{{if eq $n 0}}
53-
<div class="ui action small input" id="clone-panel">
40+
<div class="ui action tiny input" id="clone-panel">
5441
{{if not $.DisableHTTP}}
5542
<button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
5643
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}

0 commit comments

Comments
 (0)