-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be break down to be more humanly readable ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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..master
Before
After