Skip to content

Commit c814ac5

Browse files
committed
fix
1 parent 013b268 commit c814ac5

File tree

8 files changed

+25
-19
lines changed

8 files changed

+25
-19
lines changed

templates/devtest/fomantic-dropdown.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@
7575
<h2>Selection</h2>
7676
<div>
7777
{{/* the "selection" class is optional, it will be added by JS automatically */}}
78-
<select class="ui dropdown selection ellipsis-items-nowrap">
78+
<select class="ui dropdown selection ellipsis-text-items">
7979
<option>a</option>
8080
<option>abcdefuvwxyz</option>
8181
<option>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooong</option>
8282
</select>
83-
<select class="ui dropdown ellipsis-items-nowrap tw-max-w-[8em]">
83+
<select class="ui dropdown ellipsis-text-items tw-max-w-[8em]">
8484
<option>loooooooooooooooooooooooooooooooooooooooooooooooooooooooooong</option>
8585
<option>abcdefuvwxyz</option>
8686
<option>a</option>

templates/repo/actions/workflow_dispatch.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<span class="ui inline required field">
1111
<label>{{ctx.Locale.Tr "actions.workflow.from_ref"}}:</label>
1212
</span>
13-
<div class="ui inline field dropdown button select-branch branch-selector-dropdown ellipsis-items-nowrap">
13+
<div class="ui inline field dropdown button select-branch branch-selector-dropdown ellipsis-text-items">
1414
<input type="hidden" name="ref" hx-sync="this:replace" hx-target="#runWorkflowDispatchModalInputs" hx-swap="innerHTML" hx-get="{{$.Link}}/workflow-dispatch-inputs?workflow={{$.CurWorkflow}}" hx-trigger="change" value="refs/heads/{{index .Branches 0}}">
1515
{{svg "octicon-git-branch" 14}}
1616
<div class="default text">{{index .Branches 0}}</div>

templates/repo/branch_dropdown.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences.
4646
data-enable-feed="{{ctx.RootData.EnableFeed}}"
4747
>
4848
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
49-
<div class="ui dropdown custom branch-selector-dropdown ellipsis-items-nowrap">
49+
<div class="ui dropdown custom branch-selector-dropdown ellipsis-text-items">
5050
<div class="ui button branch-dropdown-button">
5151
<span class="flex-text-block gt-ellipsis">
5252
{{if not .DropdownFixedText}}

templates/repo/issue/branch_selector_field.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Still needs to figure out:
1414
*/}}
1515
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
1616
<input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}">
17-
<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-items-nowrap {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}"
17+
<div class="ui dropdown select-branch branch-selector-dropdown ellipsis-text-items {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}}"
1818
data-no-results="{{ctx.Locale.Tr "no_results_found"}}"
1919
{{if and .Issue (or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}data-url-update-issueref="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref"{{end}}
2020
>

templates/repo/issue/view_content/reference_issue_dialog.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{{.CsrfTokenHtml}}
88
<div class="field">
99
<label><strong>{{ctx.Locale.Tr "repository"}}</strong></label>
10-
<div class="ui search selection dropdown issue_reference_repository_search ellipsis-items-nowrap">
10+
<div class="ui search selection dropdown issue_reference_repository_search ellipsis-text-items">
1111
<div class="default text gt-ellipsis">{{.Repository.FullName}}</div>
1212
<div class="menu"></div>
1313
</div>

templates/repo/pulls/fork.tmpl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
{{.CsrfTokenHtml}}
1111
<div class="inline required field {{if .Err_Owner}}error{{end}}">
1212
<label>{{ctx.Locale.Tr "repo.owner"}}</label>
13-
<div class="ui selection owner dropdown">
13+
<div class="ui selection owner dropdown ellipsis-text-items">
1414
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
15-
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
15+
<span class="text" title="{{.ContextUser.Name}}">
1616
{{ctx.AvatarUtils.Avatar .ContextUser 28 "mini"}}
17-
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
17+
{{.ContextUser.ShortName 40}}
1818
</span>
1919
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
2020
<div class="menu">
2121
{{if .CanForkToUser}}
22-
<div class="item truncated-item-container" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}">
22+
<div class="item" data-value="{{.SignedUser.ID}}" title="{{.SignedUser.Name}}">
2323
{{ctx.AvatarUtils.Avatar .SignedUser 28 "mini"}}
24-
<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
24+
{{.SignedUser.ShortName 40}}
2525
</div>
2626
{{end}}
2727
{{range .Orgs}}
28-
<div class="item truncated-item-container" data-value="{{.ID}}" title="{{.Name}}">
28+
<div class="item" data-value="{{.ID}}" title="{{.Name}}">
2929
{{ctx.AvatarUtils.Avatar . 28 "mini"}}
30-
<span class="truncated-item-name">{{.ShortName 40}}</span>
30+
{{.ShortName 40}}
3131
</div>
3232
{{end}}
3333
</div>
@@ -52,10 +52,10 @@
5252
</div>
5353
<div class="inline field">
5454
<label>{{ctx.Locale.Tr "repo.fork_branch"}}</label>
55-
<div class="ui selection dropdown ellipsis-items-nowrap">
55+
<div class="ui selection dropdown ellipsis-text-items">
5656
<input type="hidden" id="fork_single_branch" name="fork_single_branch" value="" required>
5757
<div class="text" title="{{ctx.Locale.Tr "repo.all_branches"}}">
58-
<span class="truncated-item-name">{{ctx.Locale.Tr "repo.all_branches"}}</span>
58+
{{ctx.Locale.Tr "repo.all_branches"}}
5959
</div>
6060
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
6161
<div class="menu">

web_src/css/base.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,14 +1166,20 @@ the "!important" is necessary to override Fomantic UI menu item styles, meanwhil
11661166
margin: 0; /* use gap, but not margin */
11671167
}
11681168

1169-
.ui.dropdown.ellipsis-items-nowrap > .text {
1169+
.ui.dropdown.ellipsis-text-items {
1170+
/* reset y padding and use the line-height below instead, to avoid the "overflow: hidden" clips the larger image in the "text" element */
1171+
padding-top: 0;
1172+
padding-bottom: 0;
1173+
}
1174+
1175+
.ui.dropdown.ellipsis-text-items > .text {
11701176
overflow: hidden;
11711177
white-space: nowrap;
11721178
text-overflow: ellipsis;
1179+
line-height: 2.71em; /* matches fomantic dropdown's default min-height */
11731180
}
11741181

1175-
.ellipsis-items-nowrap > .item,
1176-
.ui.dropdown.ellipsis-items-nowrap .menu > .item {
1182+
.ui.dropdown.ellipsis-text-items .menu > .item {
11771183
white-space: nowrap !important;
11781184
overflow: hidden !important;
11791185
text-overflow: ellipsis !important;

web_src/js/components/RepoBranchTagSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default defineComponent({
216216
});
217217
</script>
218218
<template>
219-
<div class="ui dropdown custom branch-selector-dropdown ellipsis-items-nowrap">
219+
<div class="ui dropdown custom branch-selector-dropdown ellipsis-text-items">
220220
<div tabindex="0" class="ui button branch-dropdown-button" @click="menuVisible = !menuVisible">
221221
<span class="flex-text-block gt-ellipsis">
222222
<template v-if="dropdownFixedText">{{ dropdownFixedText }}</template>

0 commit comments

Comments
 (0)