Skip to content

Commit bcda068

Browse files
committed
Fix multiple overflowing issues in commits table
It was possible that the commit message would overflow hiding the expand commits button and commit status. This change ensures that the correct elements overflow without hiding anything else. This change also reverts using flex in the commits list because it was causing issues in Blink based browsers. Signed-off-by: Gary Kim <[email protected]>
1 parent e43d1c5 commit bcda068

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

public/css/index.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ footer .ui.left,footer .ui.right{line-height:40px}
632632
.repository #commits-table thead .sha{width:140px}
633633
.repository #commits-table thead .shatd{text-align:center}
634634
.repository #commits-table td.sha .sha.label{margin:0}
635-
.repository #commits-table td.message{display:flex;padding-top:0;padding-bottom:0}
635+
.repository #commits-table td.message{text-overflow:unset}
636636
.repository #commits-table.ui.basic.striped.table tbody tr:nth-child(2n){background-color:rgba(0,0,0,.02)!important}
637637
.repository #commits-table td.sha .sha.label,.repository #repo-files-table .sha.label{border:1px solid #bbb}
638638
.repository #commits-table td.sha .sha.label .detail.icon,.repository #repo-files-table .sha.label .detail.icon{background:#fafafa;margin:-6px -10px -4px 0;padding:5px 3px 5px 6px;border-left:1px solid #bbb;border-top-left-radius:0;border-bottom-left-radius:0}
@@ -828,8 +828,8 @@ footer .ui.left,footer .ui.right{line-height:40px}
828828
.stats-table .table-cell{display:table-cell}
829829
.stats-table .table-cell.tiny{height:.5em}
830830
tbody.commit-list{vertical-align:baseline}
831-
.commit-list .message-wrapper{overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 24px);display:inline-block;vertical-align:middle}
832-
.commit-list .message-wrapper .commit-status-link{display:inline-block;vertical-align:middle}
831+
.commit-list .message-wrapper{overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px);display:inline-block;vertical-align:middle}
832+
.commit-list .commit-status-link{display:inline-block;vertical-align:middle}
833833
.commit-body{white-space:pre-wrap}
834834
.git-notes.top{text-align:left}
835835
.git-notes .commit-body{margin:0}

public/less/_repository.less

+3-5
Original file line numberDiff line numberDiff line change
@@ -1266,9 +1266,7 @@
12661266
}
12671267

12681268
td.message {
1269-
display: flex;
1270-
padding-top: 0;
1271-
padding-bottom: 0;
1269+
text-overflow: unset;
12721270
}
12731271

12741272
&.ui.basic.striped.table tbody tr:nth-child(2n) {
@@ -2310,12 +2308,12 @@ tbody.commit-list {
23102308
.commit-list .message-wrapper {
23112309
overflow: hidden;
23122310
text-overflow: ellipsis;
2313-
max-width: calc(100% - 24px);
2311+
max-width: calc(100% - 50px);
23142312
display: inline-block;
23152313
vertical-align: middle;
23162314
}
23172315

2318-
.commit-list .message-wrapper .commit-status-link {
2316+
.commit-list .commit-status-link {
23192317
display: inline-block;
23202318
vertical-align: middle;
23212319
}

templates/repo/commits_table.tmpl

+12-7
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,19 @@
7070
</a>
7171
</td>
7272
<td class="message">
73-
<span class="message-wrapper">
74-
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary}}</span>
75-
{{if IsMultilineCommitMessage .Message}}
76-
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
77-
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
78-
{{end}}
73+
<span class="message-wrapper-parent">
74+
<span class="message-wrapper">
75+
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary}}</span>
76+
</span>
77+
{{if IsMultilineCommitMessage .Message}}
78+
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
79+
{{end}}
80+
{{template "repo/commit_status" .Status}}
81+
{{if IsMultilineCommitMessage .Message}}
82+
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
83+
{{end}}
7984
</span>
80-
{{template "repo/commit_status" .Status}}
85+
8186
</td>
8287
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
8388
</tr>

0 commit comments

Comments
 (0)