Skip to content

Commit 19a1e1b

Browse files
authored
Remove polluted .ui.right (#26825)
Each change is tested manually line by line. There are too many changes so I can't share dozens of screenshots. In short: 1. `ui right` could be still used in `ui top attached header`, because there is a special case. 2. A lot of `ui right` are just no-op, so they can be removed safely. 3. Some of the `ui right` should be replaced by `gt-float-right` (to avoid breaking, leave them to the future). 4. A few of the `ui right` could be rewritten by flex.
1 parent 98f2bf2 commit 19a1e1b

File tree

25 files changed

+51
-72
lines changed

25 files changed

+51
-72
lines changed

templates/admin/notice.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<tr>
3232
<th></th>
3333
<th colspan="5">
34-
<form class="ui right" method="post" action="{{AppSubUrl}}/admin/notices/empty">
34+
<form class="gt-float-right" method="post" action="{{AppSubUrl}}/admin/notices/empty">
3535
{{.CsrfTokenHtml}}
3636
<button type="submit" class="ui red small button">{{.locale.Tr "admin.notices.delete_all"}}</button>
3737
</form>

templates/org/settings/labels.tmpl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}}
22
<div class="org-setting-content">
3-
<div class="ui grid">
4-
<div class="left floated twelve wide column">
3+
<div class="gt-df gt-ac">
4+
<div class="gt-f1">
55
{{$.locale.Tr "org.settings.labels_desc" | Str2html}}
66
</div>
7-
<div class="right floated three wide column">
8-
<div class="ui right">
9-
<button class="ui small green new-label button">{{.locale.Tr "repo.issues.new_label"}}</button>
10-
</div>
11-
</div>
7+
<button class="ui small green new-label button">{{.locale.Tr "repo.issues.new_label"}}</button>
128
</div>
139
<div class="divider"></div>
1410
{{template "repo/issue/labels/label_new" .}}

templates/org/team/repositories.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
{{if $canAddRemove}}
4242
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
4343
{{$.CsrfTokenHtml}}
44-
<button type="submit" class="ui red small button right" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
44+
<button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
4545
</form>
4646
{{end}}
4747
</div>

templates/package/view.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
{{end}}
8888
<div class="divider"></div>
8989
<strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
90-
<a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a>
90+
<a class="gt-float-right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a>
9191
<div class="ui relaxed list">
9292
{{range .LatestVersions}}
9393
<div class="item gt-df">

templates/repo/commits_list_small.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
1515

16-
<span class="ui float right shabox gt-df gt-ac">
16+
<span class="shabox gt-df gt-ac gt-float-right">
1717
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}}
1818
{{$class := "ui sha label"}}
1919
{{if .Signature}}

templates/repo/diff/comment_form.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<div class="field footer gt-mx-3">
2424
<span class="markup-info">{{svg "octicon-markup"}} {{$.root.locale.Tr "repo.diff.comment.markdown_info"}}</span>
25-
<div class="ui right">
25+
<div class="gt-text-right">
2626
{{if $.reply}}
2727
<button class="ui submit green tiny button btn-reply" type="submit">{{$.root.locale.Tr "repo.diff.comment.reply"}}</button>
2828
<input type="hidden" name="reply" value="{{$.reply}}">

templates/repo/issue/labels.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
<div class="navbar gt-mb-4">
66
{{template "repo/issue/navbar" .}}
77
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
8-
<div class="ui right">
9-
<button class="ui small green new-label button">{{.locale.Tr "repo.issues.new_label"}}</button>
10-
</div>
8+
<button class="ui small green new-label button">{{.locale.Tr "repo.issues.new_label"}}</button>
119
{{end}}
1210
</div>
1311
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}

templates/repo/issue/milestones.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
<div class="navbar gt-mb-4">
66
{{template "repo/issue/navbar" .}}
77
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
8-
<div class="ui right">
9-
<a class="ui small green button" href="{{$.Link}}/new">{{.locale.Tr "repo.milestones.new"}}</a>
10-
</div>
8+
<a class="ui small green button" href="{{$.Link}}/new">{{.locale.Tr "repo.milestones.new"}}</a>
119
{{end}}
1210
</div>
1311
{{template "base/alert" .}}

templates/repo/issue/view_content/attachments.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</a>
2020
</div>
2121
<div class="gt-p-3 gt-df gt-ac">
22-
<span class="ui text grey right">{{.Size | FileSize}}</span>
22+
<span class="ui text grey">{{.Size | FileSize}}</span>
2323
</div>
2424
</div>
2525
{{end -}}

templates/repo/issue/view_content/comments.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,15 +477,15 @@
477477
</div>
478478
<div>
479479
{{if or $invalid $resolved}}
480-
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact right labeled button show-outdated gt-df gt-ac">
480+
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact labeled button show-outdated gt-df gt-ac">
481481
{{svg "octicon-unfold" 16 "gt-mr-3"}}
482482
{{if $resolved}}
483483
{{$.locale.Tr "repo.issues.review.show_resolved"}}
484484
{{else}}
485485
{{$.locale.Tr "repo.issues.review.show_outdated"}}
486486
{{end}}
487487
</button>
488-
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact right labeled button hide-outdated gt-df gt-ac">
488+
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact labeled button hide-outdated gt-df gt-ac">
489489
{{svg "octicon-fold" 16 "gt-mr-3"}}
490490
{{if $resolved}}
491491
{{$.locale.Tr "repo.issues.review.hide_resolved"}}
@@ -698,7 +698,7 @@
698698
{{end}}
699699
</span>
700700
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
701-
<span class="ui float right comparebox">
701+
<span class="gt-float-right comparebox">
702702
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{$.locale.Tr "repo.issues.force_push_compare"}}</a>
703703
</span>
704704
{{end}}

0 commit comments

Comments
 (0)