Skip to content

Commit d80f99e

Browse files
authored
Fix issue sidebar (#32455)
Fix #32453 Major changes: * revert the `<div class="divider"></div>` in `templates/repo/issue/branch_selector_field.tmpl` (it was removed by mistake in ##32444) * remove incorrect `<div class="inline field">` in `templates/repo/issue/sidebar/allow_maintainer_edit.tmpl` * use `gt-ellipsis` to replace the "title" class in the dependency list, then `.repository .issue-content-right .ui.list .title` could be removed * remove the "relaxed" from dependency list, then there is no padding, then `.repository .issue-content-right .ui.list .dependency` could be removed (`white-space` doesn't have effect either because there is `gt-ellipsis`) * remove dead code `.repository .issue-content-right #deadlineForm input ` The fixed UI should be the same as before.
1 parent 0f397ae commit d80f99e

File tree

4 files changed

+13
-31
lines changed

4 files changed

+13
-31
lines changed

templates/repo/issue/branch_selector_field.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
</div>
4545
</div>
4646
</div>
47+
<div class="divider"></div>
4748
{{end}}
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
{{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
22
{{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
33
<div class="divider"></div>
4-
<div class="inline field">
5-
<div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
6-
data-url="{{.Issue.Link}}"
7-
data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
8-
data-prompt-error="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}"
9-
>
10-
<label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
11-
<input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
12-
</div>
4+
<div class="ui checkbox loading-icon-2px" id="allow-edits-from-maintainers"
5+
data-url="{{.Issue.Link}}"
6+
data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
7+
data-prompt-error="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}"
8+
>
9+
<label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
10+
<input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
1311
</div>
1412
{{end}}
1513
{{end}}

templates/repo/issue/sidebar/issue_dependencies.tmpl

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
<span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}">
1919
<strong>{{ctx.Locale.Tr "repo.issues.dependency.blocks_short"}}</strong>
2020
</span>
21-
<div class="ui relaxed divided list">
21+
<div class="ui divided list">
2222
{{range .BlockingDependencies}}
2323
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
2424
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
25-
<a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
25+
<a class="muted gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
2626
#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
2727
</a>
2828
<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
@@ -50,11 +50,11 @@
5050
<span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}">
5151
<strong>{{ctx.Locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong>
5252
</span>
53-
<div class="ui relaxed divided list">
53+
<div class="ui divided list">
5454
{{range .BlockedByDependencies}}
5555
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
5656
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
57-
<a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
57+
<a class="muted gt-ellipsis" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
5858
#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
5959
</a>
6060
<div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
@@ -76,7 +76,7 @@
7676
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
7777
<div class="gt-ellipsis">
7878
<span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span>
79-
<span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
79+
<span class="gt-ellipsis" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}">
8080
#{{.Issue.Index}} {{.Issue.Title | ctx.RenderUtils.RenderEmoji}}
8181
</span>
8282
</div>

web_src/css/repo.css

-17
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,6 @@
6262
}
6363
}
6464

65-
.repository .issue-content-right .ui.list .dependency {
66-
padding: 0;
67-
white-space: nowrap;
68-
}
69-
70-
.repository .issue-content-right .ui.list .title {
71-
overflow: hidden;
72-
text-overflow: ellipsis;
73-
}
74-
75-
.repository .issue-content-right #deadlineForm input {
76-
width: 12.8rem;
77-
border-radius: var(--border-radius) 0 0 var(--border-radius);
78-
border-right: 0;
79-
white-space: nowrap;
80-
}
81-
8265
.repository .issue-content-right .filter.menu {
8366
max-height: 500px;
8467
overflow-x: auto;

0 commit comments

Comments
 (0)