More tweaks to repo top panel - #2267
Conversation
| </div> | ||
| {{ $n := len .TreeNames}} | ||
| {{ $l := Subtract $n 1}} | ||
| <div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div> |
There was a problem hiding this comment.
This line can be break down to be more humanly readable ^^
There was a problem hiding this comment.
Unfortunately not, if we want the path to be copyable as-is. If I add any indentation to this block, a path like someproject/somefile will copy as someproject / somefile or similar to the clipboard. Even adding indentation to the wrapping <div> will result in a trailing whitespace being copied.
As mentioned, a proper fix would be to minify the HTML, maybe by precompiling the templates to a form that does not feature indendation.
|
LGTM as this. I add a comment for just a little formating of code. |
|
@silverwind this change breaks integration tests |
|
Hmm that's probably because of the removed compare button on |
|
Hmm, still failing. Are you sure it's related? |
|
It should be related. |
|
CI is fixed now. It actually was testing for the exact CSS classes. |
|
LGTM Nice to see these UI improvements, even small ones. Thank you! |
This includes various tweaks to the repo top panel.
Hide the green compare button when the comparison would compare same branches, e.g.master..masterBefore
After