loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve commit graph alignment and truncating (#26112)

Fix #26101

![image](https://github.com/go-gitea/gitea/assets/2114189/7507d201-822e-4534-8b20-e659d56b1268)

authored by

wxiaoguang and committed by
GitHub
ad5ce598 d817b199

+15 -10
+9 -9
templates/repo/graph/commits.tmpl
··· 31 31 <span class="message gt-dib gt-ellipsis gt-mr-3"> 32 32 <span>{{RenderCommitMessage $.Context $commit.Subject $.RepoLink $.Repository.ComposeMetas}}</span> 33 33 </span> 34 - <span class="tags gt-df gt-ac gt-mr-2"> 34 + <span class="commit-refs gt-df gt-ac gt-mr-2"> 35 35 {{range $commit.Refs}} 36 36 {{$refGroup := .RefGroup}} 37 37 {{if eq $refGroup "pull"}} 38 38 {{if or (not $.HidePRRefs) (SliceUtils.Contains $.SelectedBranches .Name)}} 39 39 <!-- it's intended to use issues not pulls, if it's a pull you will get redirected --> 40 - <a class="ui labelled icon button basic tiny gt-mr-2" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled $.Context $.UnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}"> 41 - {{svg "octicon-git-pull-request" 16 "gt-mr-2"}}#{{.ShortName}} 40 + <a class="ui labelled basic tiny button" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled $.Context $.UnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}"> 41 + {{svg "octicon-git-pull-request"}} #{{.ShortName}} 42 42 </a> 43 43 {{end}} 44 44 {{else if eq $refGroup "tags"}} 45 - <a class="ui labelled icon button basic tiny gt-mr-2" href="{{$.RepoLink}}/src/tag/{{.ShortName|PathEscape}}"> 46 - {{svg "octicon-tag" 16 "gt-mr-2"}}{{.ShortName}} 45 + <a class="ui labelled basic tiny button" href="{{$.RepoLink}}/src/tag/{{.ShortName|PathEscape}}"> 46 + {{svg "octicon-tag"}} {{.ShortName}} 47 47 </a> 48 48 {{else if eq $refGroup "remotes"}} 49 - <a class="ui labelled icon button basic tiny gt-mr-2" href="{{$.RepoLink}}/src/commit/{{$commit.Rev|PathEscape}}"> 50 - {{svg "octicon-cross-reference" 16 "gt-mr-2"}}{{.ShortName}} 49 + <a class="ui labelled basic tiny button" href="{{$.RepoLink}}/src/commit/{{$commit.Rev|PathEscape}}"> 50 + {{svg "octicon-cross-reference"}} {{.ShortName}} 51 51 </a> 52 52 {{else if eq $refGroup "heads"}} 53 - <a class="ui labelled icon button basic tiny gt-mr-2" href="{{$.RepoLink}}/src/branch/{{.ShortName|PathEscape}}"> 54 - {{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.ShortName}} 53 + <a class="ui labelled basic tiny button" href="{{$.RepoLink}}/src/branch/{{.ShortName|PathEscape}}"> 54 + {{svg "octicon-git-branch"}} {{.ShortName}} 55 55 </a> 56 56 {{else}} 57 57 <!-- Unknown ref type .Name -->
+6 -1
web_src/css/features/gitgraph.css
··· 109 109 background-color: var(--color-secondary-alpha-30); 110 110 } 111 111 112 - #git-graph-container #rev-list .tags a.button { 112 + #git-graph-container #rev-list .commit-refs .button { 113 113 padding: 2px 4px; 114 + margin-right: 0.25em; 115 + display: inline-block; 116 + max-width: 200px; 117 + overflow: hidden; 118 + text-overflow: ellipsis; 114 119 } 115 120 116 121 #git-graph-container #rev-list .sha.label {