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

Fix long project name display in issue list and in related dropdown #23653

Merged
merged 12 commits into from
Mar 24, 2023
8 changes: 4 additions & 4 deletions templates/repo/issue/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
{{.locale.Tr "repo.issues.new.open_projects"}}
</div>
{{range .OpenProjects}}
<a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
{{svg .IconName 18 "gt-mr-3"}}{{.Title}}
<a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}">
{{svg .IconName 18 "gt-mr-3 gt-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span>
</a>
{{end}}
{{end}}
Expand Down Expand Up @@ -131,7 +131,7 @@
</div>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}">{{.locale.Tr "repo.issues.filter_poster_no_select"}}</a>
{{range .Posters}}
<a class="{{if eq $.PosterID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{.ID}}">
<a class="{{if eq $.PosterID .ID}}active selected{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{.ID}}">
{{avatar $.Context .}}{{template "repo/search_name" .}}
</a>
{{end}}
Expand All @@ -151,7 +151,7 @@
</div>
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&poster={{$.PosterID}}">{{.locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
{{range .Assignees}}
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{.ID}}&poster={{$.PosterID}}">
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item gt-df" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{.ID}}&poster={{$.PosterID}}">
{{avatar $.Context .}}{{template "repo/search_name" .}}
</a>
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/search_name.tmpl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{.Name}}{{if IsShowFullName}}<span class="search-fullname"> {{.FullName}}</span>{{end}}
<span class="gt-ellipsis">{{.Name}}{{if IsShowFullName}}<span class="search-fullname"> {{.FullName}}</span>{{end}}</span>
18 changes: 11 additions & 7 deletions templates/shared/issuelist.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -143,28 +143,32 @@
{{end}}
</div>
</div>
{{if or .TotalTrackedTime .Assignees .NumComments}}
<div class="issue-item-icons-right gt-df gt-p-2">
{{if .TotalTrackedTime}}
<div class="issue-item-icon-right text grey">
{{if .TotalTrackedTime}}
{{svg "octicon-clock" 16 "gt-mr-2"}}
{{.TotalTrackedTime | Sec2Time}}
{{end}}
</div>
{{end}}
{{if .Assignees}}
<div class="issue-item-icon-right text grey">
{{range .Assignees}}
<a class="ui assignee tooltip gt-tdn" href="{{.HomeLink}}" data-content="{{.GetDisplayName}}" data-position="left center">
{{avatar $.Context .}}
</a>
{{end}}
</div>
{{end}}
{{if .NumComments}}
<div class="issue-item-icon-right text grey">
{{if .NumComments}}
<a class="gt-tdn muted" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{svg "octicon-comment" 16 "gt-mr-2"}}{{.NumComments}}
</a>
{{end}}
<a class="gt-tdn muted" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{svg "octicon-comment" 16 "gt-mr-2"}}{{.NumComments}}
</a>
</div>
{{end}}
</div>
{{end}}
</li>
{{end}}
{{if .IssueIndexerUnavailable}}
Expand Down
1 change: 1 addition & 0 deletions web_src/css/helpers.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@

.gt-content-center { align-content: center !important; }

.gt-shrink-0 { flex-shrink: 0 !important; }
.gt-whitespace-nowrap { white-space: nowrap !important; }

@media (max-width: 767px) {
Expand Down
3 changes: 2 additions & 1 deletion web_src/css/repository.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@

.repository .filter.menu .menu {
max-height: 500px;
overflow-x: auto;
max-width: 300px;
overflow-x: hidden;
right: 0 !important;
left: auto !important;
}
Expand Down
1 change: 1 addition & 0 deletions web_src/css/shared/issuelist.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

.issue.list > .item .desc a {
color: inherit;
word-break: break-word;
}

.issue.list > .item .desc .time-since,
Expand Down