Compare commits

..

No commits in common. "ddf61373f691a584844f141bc4728948fe142dc3" and "75eaf9907604b1689e491b4fb4354b2d0b9ac3b6" have entirely different histories.

8 changed files with 21 additions and 35 deletions

View File

@ -6,11 +6,11 @@ weight: 20
toc: false
draft: false
menu:
sidebar:
parent: "developers"
name: "Guidelines for Refactoring"
weight: 20
identifier: "guidelines-refactoring"
sidebar:
parent: "developers"
name: "Guidelines for Refactoring"
weight: 20
identifier: "guidelines-refactoring"
---
# Guidelines for Refactoring

View File

@ -25,8 +25,6 @@ const (
func NewDiffPatch(ctx *context.Context) {
canCommit := renderCommitRights(ctx)
ctx.Data["PageIsPatch"] = true
ctx.Data["TreePath"] = ""
ctx.Data["commit_summary"] = ""
@ -53,7 +51,6 @@ func NewDiffPatchPost(ctx *context.Context) {
if form.CommitChoice == frmCommitChoiceNewBranch {
branchName = form.NewBranchName
}
ctx.Data["PageIsPatch"] = true
ctx.Data["TreePath"] = ""
ctx.Data["BranchLink"] = ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
ctx.Data["FileContent"] = form.Content

View File

@ -18,9 +18,9 @@
</span>
</a>
{{end}}
<button class="ui icon button mobile-only" id="navbar-expand-toggle">
<div class="ui icon button mobile-only" id="navbar-expand-toggle">
{{svg "octicon-three-bars"}}
</button>
</div>
</div>
</div>

View File

@ -9,7 +9,7 @@
{{.locale.Tr "repo.editor.commit_changes"}}
{{- end}}</h3>
<div class="field">
<input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else if .PageIsPatch}}{{.locale.Tr "repo.editor.patch"}}{{else}}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
<input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.locale.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.locale.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.locale.Tr "repo.editor.add_tmpl"}}{{else}}{{.locale.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>
</div>
<div class="field">
<textarea name="commit_message" placeholder="{{.locale.Tr "repo.editor.commit_message_desc"}}" rows="5">{{.commit_message}}</textarea>

View File

@ -27,7 +27,7 @@
</a>
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3">
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
<div class="comment-header-left gt-df gt-ac">
{{if .Issue.OriginalAuthor}}
<span class="text black gt-bold">
@ -69,7 +69,7 @@
{{end}}
</div>
</div>
<div class="ui attached segment comment-body" role="article">
<div class="ui attached segment comment-body">
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}>
{{if .Issue.RenderedContent}}
{{.Issue.RenderedContent|Str2html}}
@ -85,7 +85,7 @@
</div>
{{$reactions := .Issue.Reactions.GroupByType}}
{{if $reactions}}
<div class="ui attached segment reactions" role="note">
<div class="ui attached segment reactions">
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
</div>
{{end}}

View File

@ -22,7 +22,7 @@
</a>
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3">
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
<div class="comment-header-left gt-df gt-ac">
{{if .OriginalAuthor}}
<span class="text black gt-bold gt-mr-2">
@ -69,7 +69,7 @@
{{end}}
</div>
</div>
<div class="ui attached segment comment-body" role="article">
<div class="ui attached segment comment-body">
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
@ -85,7 +85,7 @@
</div>
{{$reactions := .Reactions.GroupByType}}
{{if $reactions}}
<div class="ui attached segment reactions" role="note">
<div class="ui attached segment reactions">
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
</div>
{{end}}

View File

@ -8,14 +8,14 @@
{{if .LatestCommitUser}}
{{avatar $.Context .LatestCommitUser 24}}
{{if .LatestCommitUser.FullName}}
<a class="muted author-wrapper" title="{{.LatestCommitUser.FullName}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
<a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
{{else}}
<a class="muted author-wrapper" title="{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
<a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
{{end}}
{{else}}
{{if .LatestCommit.Author}}
{{avatarByEmail $.Context .LatestCommit.Author.Email .LatestCommit.Author.Name 24}}
<span class="author-wrapper" title="{{.LatestCommit.Author.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></span>
<strong>{{.LatestCommit.Author.Name}}</strong>
{{end}}
{{end}}
<a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified}} isVerified{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}Untrusted{{else}}Unmatched{{end}}{{else if .LatestCommitVerification.Warning}} isWarning{{end}}{{end}}" href="{{.RepoLink}}/commit/{{PathEscape .LatestCommit.ID.String}}">

View File

@ -237,8 +237,6 @@
}
#repo-files-table {
table-layout: fixed;
thead {
th {
padding-top: 8px;
@ -2887,8 +2885,7 @@ tbody.commit-list {
vertical-align: baseline;
}
.message-wrapper,
.author-wrapper {
.message-wrapper {
overflow: hidden;
text-overflow: ellipsis;
max-width: calc(100% - 50px);
@ -2896,10 +2893,6 @@ tbody.commit-list {
vertical-align: middle;
}
.author-wrapper {
max-width: 180px;
}
// in the commit list, messages can wrap so we can use inline
.commit-list .message-wrapper {
display: inline;
@ -2919,10 +2912,6 @@ tbody.commit-list {
display: block;
max-width: calc(100vw - 70px);
}
.author-wrapper {
max-width: 80px;
}
}
@media @mediaMd {
@ -2931,7 +2920,7 @@ tbody.commit-list {
}
th .message-wrapper {
max-width: 120px;
max-width: 280px;
}
}
@ -2941,7 +2930,7 @@ tbody.commit-list {
}
th .message-wrapper {
max-width: 350px;
max-width: 490px;
}
}
@ -2951,7 +2940,7 @@ tbody.commit-list {
}
th .message-wrapper {
max-width: 525px;
max-width: 680px;
}
}