Skip to content

Commit 4a722c9

Browse files
Make Issue/PR/projects more compact, misc CSS tweaks (#24459)
- Remove various horizontal dividers on repo pages that didn't provide visual benefit - Remove label/milestone pills on single issue/pr page - Remove issue-related pill buttons on projects page - Increase contrast of color-secondary on arc-green - Improve notifications icon, make circle bigger - Remove some inline styles - Fix focus in issue/pr title edit and select all text on button click ### Issue and PR before and after <img width="1249" alt="Screenshot 2023-05-01 at 11 44 22" src="https://user-images.githubusercontent.com/115237/235436662-a708288e-84fb-4b2e-a5a2-3a1c17d28f6c.png"> <img width="1248" alt="Screenshot 2023-05-01 at 11 58 51" src="https://user-images.githubusercontent.com/115237/235437992-f863e483-f3cc-4cc1-8204-fd223647a0c9.png"> ### Projects before and after <img width="1255" alt="Screenshot 2023-05-01 at 11 41 02" src="https://user-images.githubusercontent.com/115237/235436433-0deb85d6-4e7d-4e74-847f-254cc70a0cf9.png"> <img width="1267" alt="Screenshot 2023-05-01 at 11 40 03" src="https://user-images.githubusercontent.com/115237/235436431-715b13cb-f78c-4d86-b27a-9229f9738c5b.png"> ### Releases before and after <img width="1243" alt="Screenshot 2023-05-01 at 11 41 12" src="https://user-images.githubusercontent.com/115237/235436457-b655ee6f-03b8-4595-8d8c-b15ea469e988.png"> <img width="1240" alt="Screenshot 2023-05-01 at 11 40 10" src="https://user-images.githubusercontent.com/115237/235436456-05a2a0dd-7cbb-4f26-b0d3-4f667df4bb95.png"> ### Misc <img width="58" alt="Screenshot 2023-05-01 at 10 49 13" src="https://user-images.githubusercontent.com/115237/235432494-936ce995-6e22-47bc-ab2d-c9e93d31987d.png"> <img width="57" alt="Screenshot 2023-05-01 at 18 57 08" src="https://user-images.githubusercontent.com/115237/235492430-1d32cfe0-0f2c-467c-b2fa-925b27e30e0e.png"> Issue title edit and wrap: <img width="1238" alt="Screenshot 2023-05-01 at 12 34 40" src="https://user-images.githubusercontent.com/115237/235441407-d5067a57-e586-4865-a652-282e5944abb4.png"> <img width="1232" alt="Screenshot 2023-05-01 at 12 06 24" src="https://user-images.githubusercontent.com/115237/235438710-1a543dda-220f-4d87-8f93-f1710c0695f0.png"> --------- Co-authored-by: wxiaoguang <[email protected]>
1 parent 723598b commit 4a722c9

34 files changed

+255
-320
lines changed

templates/org/member/members.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="list">
88
{{range .Members}}
99
<div class="item ui grid">
10-
<div class="ui four wide column" style="display: flex;">
10+
<div class="ui four wide column gt-df">
1111
<a href="{{.HomeLink}}">{{avatar $.Context . 48}}</a>
1212
<div>
1313
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>

templates/projects/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{end}}
1111

1212
{{template "base/alert" .}}
13-
<div class="small-pill-buttons ui compact tiny menu">
13+
<div class="small-menu-items ui compact tiny menu">
1414
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=open">
1515
{{svg "octicon-project-symlink" 16 "gt-mr-3"}}
1616
{{.locale.PrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}

templates/repo/actions/openclose.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="small-pill-buttons ui compact tiny menu">
1+
<div class="small-menu-items ui compact tiny menu">
22
<a class="{{if not .IsShowClosed}}active {{end}}item" href="{{$.Link}}?workflow={{.CurWorkflow}}&state=open">
33
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
44
{{.locale.Tr "actions.runs.open_tab" $.NumOpenActionRuns}}

templates/repo/branch_dropdown.tmpl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
{{/* Attributes:
2+
* root
3+
* ContainerClasses
4+
* (TODO: search "branch_dropdown" in the template direcotry)
5+
*/}}
16
{{$defaultBranch := $.root.BranchName}}
27
{{if and .root.IsViewTag (not .noTag)}}
38
{{$defaultBranch = .root.TagName}}
@@ -62,10 +67,10 @@
6267
window.config.pageData.branchDropdownDataList.push(data);
6368
</script>
6469

65-
<div class="fitted item js-branch-tag-selector">
70+
<div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}">
6671
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
6772
<div class="ui floating filter dropdown custom">
68-
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df">
73+
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df gt-m-0">
6974
<span class="text gt-df gt-ac gt-mr-2">
7075
{{if .release}}
7176
{{.root.locale.Tr "repo.release.compare"}}

templates/repo/commits.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{template "repo/sub_menu" .}}
66
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw gt-mb-4 gt-mt-3">
77
<div class="gt-df gt-ac">
8-
{{template "repo/branch_dropdown" dict "root" .}}
8+
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
99
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
1010
<span class="text">
1111
{{svg "octicon-git-branch"}}

templates/repo/home.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
{{template "repo/sub_menu" .}}
6464
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw">
6565
<div class="gt-df gt-ac gt-fw gt-gap-y-3">
66-
{{template "repo/branch_dropdown" dict "root" .}}
66+
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
6767
{{$n := len .TreeNames}}
6868
{{$l := Eval $n "-" 1}}
6969
<!-- If home page, show new pr. If not, show breadcrumb -->

templates/repo/issue/labels.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
<div role="main" aria-label="{{.Title}}" class="page-content repository labels">
33
{{template "repo/header" .}}
44
<div class="ui container">
5-
<div class="navbar">
5+
<div class="navbar gt-mb-4">
66
{{template "repo/issue/navbar" .}}
77
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
88
<div class="ui right">
99
<button class="ui green new-label button">{{.locale.Tr "repo.issues.new_label"}}</button>
1010
</div>
1111
{{end}}
1212
</div>
13-
<div class="ui divider"></div>
1413
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
1514
{{template "repo/issue/labels/label_new" .}}
1615
{{end}}

templates/repo/issue/list.tmpl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
{{end}}
1818
{{end}}
1919
</div>
20-
21-
<div class="ui divider"></div>
22-
2320
<div id="issue-filters" class="issue-list-toolbar">
2421
<div class="issue-list-toolbar-left">
2522
{{if $.CanWriteIssuesOrPulls}}

templates/repo/issue/milestones.tmpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
<div role="main" aria-label="{{.Title}}" class="page-content repository milestones">
33
{{template "repo/header" .}}
44
<div class="ui container">
5-
<div class="navbar">
5+
<div class="navbar gt-mb-4">
66
{{template "repo/issue/navbar" .}}
77
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
88
<div class="ui right">
99
<a class="ui small green button" href="{{$.Link}}/new">{{.locale.Tr "repo.milestones.new"}}</a>
1010
</div>
1111
{{end}}
1212
</div>
13-
<div class="ui divider"></div>
1413
{{template "base/alert" .}}
1514

1615
<div class="list-header">
17-
<div class="small-pill-buttons ui compact tiny menu">
16+
<div class="small-menu-items ui compact tiny menu">
1817
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/milestones?state=open&q={{$.Keyword}}">
1918
{{svg "octicon-milestone" 16 "gt-mr-3"}}
2019
{{.locale.PrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}

templates/repo/issue/navbar.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h2 class="ui compact small menu header small-pill-buttons">
1+
<h2 class="ui compact small menu header small-menu-items">
22
<a class="{{if .PageIsLabels}}active {{end}}item" href="{{.RepoLink}}/labels">{{.locale.Tr "repo.labels"}}</a>
33
<a class="{{if .PageIsMilestones}}active {{end}}item" href="{{.RepoLink}}/milestones">{{.locale.Tr "repo.milestones"}}</a>
44
</h2>

0 commit comments

Comments
 (0)