Skip to content

Commit ce64641

Browse files
authored
fix toggle commit body button ui when latest commit message is long (#32997) (#33034)
backport #32997 and #33002
1 parent 7f0050c commit ce64641

File tree

5 files changed

+18
-171
lines changed

5 files changed

+18
-171
lines changed

package-lock.json

Lines changed: 8 additions & 166 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"eslint": "8.57.0",
8787
"eslint-import-resolver-typescript": "3.7.0",
8888
"eslint-plugin-array-func": "4.0.0",
89-
"eslint-plugin-github": "5.1.3",
89+
"eslint-plugin-github": "5.0.2",
9090
"eslint-plugin-import-x": "4.5.0",
9191
"eslint-plugin-no-jquery": "3.1.0",
9292
"eslint-plugin-no-use-extend-native": "0.5.0",

templates/repo/commit_statuses.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{{if .Statuses}}
22
{{if and (eq (len .Statuses) 1) .Status.TargetURL}}
3-
<a class="tw-align-middle {{.AdditionalClasses}} tw-no-underline" data-tippy="commit-statuses" href="{{.Status.TargetURL}}">
3+
<a class="flex-text-inline tw-no-underline {{.AdditionalClasses}}" data-tippy="commit-statuses" href="{{.Status.TargetURL}}">
44
{{template "repo/commit_status" .Status}}
55
</a>
66
{{else}}
7-
<span class="tw-align-middle {{.AdditionalClasses}}" data-tippy="commit-statuses" tabindex="0">
7+
<span class="flex-text-inline {{.AdditionalClasses}}" data-tippy="commit-statuses" tabindex="0">
88
{{template "repo/commit_status" .Status}}
99
</span>
1010
{{end}}

templates/repo/latest_commit.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
33
{{else}}
44
{{if .LatestCommitUser}}
5-
{{ctx.AvatarUtils.Avatar .LatestCommitUser 24 "tw-mr-1"}}
5+
{{ctx.AvatarUtils.Avatar .LatestCommitUser 24}}
66
{{if and .LatestCommitUser.FullName DefaultShowFullName}}
77
<a class="muted author-wrapper" title="{{.LatestCommitUser.FullName}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
88
{{else}}
99
<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>
1010
{{end}}
1111
{{else}}
1212
{{if .LatestCommit.Author}}
13-
{{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24 "tw-mr-1"}}
13+
{{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24}}
1414
<span class="author-wrapper" title="{{.LatestCommit.Author.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></span>
1515
{{end}}
1616
{{end}}

web_src/css/repo.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ td .commit-summary {
120120
align-items: center;
121121
overflow: hidden;
122122
text-overflow: ellipsis;
123+
gap: 0.25em;
123124
}
124125

125126
@media (max-width: 767.98px) {
@@ -1701,6 +1702,10 @@ tbody.commit-list {
17011702
white-space: nowrap;
17021703
}
17031704

1705+
.latest-commit .message-wrapper {
1706+
max-width: calc(100% - 2.5rem);
1707+
}
1708+
17041709
/* in the commit list, messages can wrap so we can use inline */
17051710
.commit-list .message-wrapper {
17061711
display: inline;

0 commit comments

Comments
 (0)