Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve issue sidebar UI #32587

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/repo/issue/sidebar/label_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{$previousExclusiveScope = $exclusiveScope}}
{{template "repo/issue/sidebar/label_list_item" dict "Label" .}}
{{end}}
<div class="divider"></div>
{{if and $data.RepoLabels $data.OrgLabels}}<div class="divider"></div>{{end}}
{{$previousExclusiveScope = "_no_scope"}}
{{range $data.OrgLabels}}
{{$exclusiveScope := .ExclusiveScope}}
Expand Down
3 changes: 1 addition & 2 deletions templates/repo/issue/sidebar/milestone_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_milestone"}}</div>
<div class="scrolling menu">
{{if $data.OpenMilestones}}
<div class="divider"></div>
<div class="header">{{ctx.Locale.Tr "repo.issues.new.open_milestone"}}</div>
{{range $data.OpenMilestones}}
<a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/issues?milestone={{.ID}}">
{{svg "octicon-milestone" 18}} {{.Name}}
</a>
{{end}}
{{end}}
{{if and $data.OpenMilestones $data.ClosedMilestones}}<div class="divider"></div>{{end}}
{{if $data.ClosedMilestones}}
<div class="divider"></div>
<div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_milestone"}}</div>
{{range $data.ClosedMilestones}}
<a class="item muted" data-value="{{.ID}}" href="{{$pageMeta.RepoLink}}/issues?milestone={{.ID}}">
Expand Down
3 changes: 1 addition & 2 deletions templates/repo/issue/sidebar/project_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@
<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
<div class="scrolling menu">
{{if $data.OpenProjects}}
<div class="divider"></div>
<div class="header">{{ctx.Locale.Tr "repo.issues.new.open_projects"}}</div>
{{range $data.OpenProjects}}
<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
{{svg .IconName 18}} {{.Title}}
</a>
{{end}}
{{end}}
{{if and $data.OpenProjects $data.ClosedProjects}}<div class="divider"></div>{{end}}
{{if $data.ClosedProjects}}
<div class="divider"></div>
<div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}</div>
{{range $data.ClosedProjects}}
<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/sidebar/reviewer_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_reviewers"}}">
</div>
{{end}}
<div class="scrolling menu">
<div class="scrolling menu flex-items-menu">
{{range $data.Reviewers}}
{{if .User}}
<a class="item muted {{if .Requested}}checked{{end}}" href="{{.User.HomeLink}}" data-value="{{.ItemID}}" data-can-change="{{.CanChange}}"
Expand Down
4 changes: 4 additions & 0 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,10 @@ table th[data-sortt-desc] .svg {
gap: .5rem;
min-width: 0;
}
.ui.dropdown .menu.flex-items-menu > .item img,
.ui.dropdown .menu.flex-items-menu > .item svg {
margin: 0; /* use gap, but not margin */
}

.ui.dropdown.ellipsis-items-nowrap > .text {
overflow: hidden;
Expand Down
10 changes: 0 additions & 10 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
.issue-sidebar-combo .ui.dropdown .item:not(.checked) .item-check-mark {
visibility: hidden;
}
/* ideally, we should move these styles to ".ui.dropdown .menu.flex-items-menu > .item ...", could be done later */
.issue-sidebar-combo .ui.dropdown .menu > .item > img,
.issue-sidebar-combo .ui.dropdown .menu > .item > svg {
margin: 0;
}

.issue-content-right .dropdown > .menu {
max-width: 270px;
Expand All @@ -79,11 +74,6 @@
}
}

.repository .issue-content-right .filter.menu {
max-height: 500px;
overflow-x: auto;
}

.repository .filter.menu.labels .label-filter .menu .info {
display: inline-block;
padding: 0.5rem 0;
Expand Down
Loading