Increase clickable area on files table links (#12553)

tokarchuk/v1.17
silverwind 4 years ago committed by GitHub
parent d2cee3eea6
commit dd8ec12188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      integrations/repo_test.go
  2. 6
      templates/repo/view_list.tmpl
  3. 15
      web_src/less/_repository.less

@ -148,7 +148,7 @@ func TestViewRepoWithSymlinks(t *testing.T) {
resp := session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body)
files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name > SPAN")
files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR > TD.name")
items := files.Map(func(i int, s *goquery.Selection) string {
cls, _ := s.Find("SVG").Attr("class")
file := strings.Trim(s.Find("A").Text(), " \t\n")

@ -45,7 +45,6 @@
<tr>
{{if $entry.IsSubModule}}
<td>
<span class="truncate">
{{svg "octicon-file-submodule" 16}}
{{$refURL := $commit.RefURL AppUrl $.Repository.FullName}}
{{if $refURL}}
@ -53,11 +52,9 @@
{{else}}
{{$entry.Name}} @ {{ShortSha $commit.RefID}}
{{end}}
</span>
</td>
{{else}}
<td class="name four wide">
<span class="truncate">
{{if $entry.IsDir}}
{{$subJumpablePathName := $entry.GetSubJumpablePathName}}
{{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
@ -73,13 +70,10 @@
{{svg (printf "octicon-%s" (EntryIcon $entry)) 16}}
<a href="{{EscapePound $.TreeLink}}/{{EscapePound $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
{{end}}
</span>
</td>
{{end}}
<td class="message nine wide">
<span class="truncate">
<a href="{{$.RepoLink}}/commit/{{$commit.ID}}" title="{{$commit.Summary}}">{{$commit.Summary | RenderEmoji}}</a>
</span>
</td>
<td class="text right age three wide">{{TimeSince $commit.Committer.When $.Lang}}</td>
</tr>

@ -345,8 +345,8 @@
}
td {
padding-top: 8px;
padding-bottom: 8px;
padding-top: 0;
padding-bottom: 0;
overflow: initial;
&.name {
@ -361,14 +361,19 @@
width: 120px;
}
.truncate {
> a {
width: calc(100% - 8px); /* prevent overflow into adjacant cell */
display: inline-block;
max-width: 100%;
padding-top: 8px;
padding-bottom: 8px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: top;
white-space: nowrap;
}
> * {
vertical-align: middle;
}
}
td.message .isSigned {

Loading…
Cancel
Save