Skip to content

Commit 3cccaba

Browse files
committed
Fix long branch name overflow in branch selector and issue list
1 parent 908426a commit 3cccaba

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

templates/repo/branch_dropdown.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
7272
<div class="ui dropdown custom">
7373
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button tw-flex tw-m-0">
74-
<span class="text tw-flex tw-items-center tw-mr-1">
74+
<span class="text tw-flex tw-items-center tw-mr-1 gt-ellipsis">
7575
{{if .release}}
7676
{{ctx.Locale.Tr "repo.release.compare"}}
7777
{{else}}
@@ -80,7 +80,7 @@
8080
{{else}}
8181
{{svg "octicon-git-branch"}}
8282
{{end}}
83-
<strong ref="dropdownRefName" class="tw-ml-2">{{if and .root.IsViewTag (not .noTag)}}{{.root.TagName}}{{else if .root.IsViewBranch}}{{.root.BranchName}}{{else}}{{ShortSha .root.CommitID}}{{end}}</strong>
83+
<strong ref="dropdownRefName" class="tw-ml-2 tw-inline-block gt-ellipsis">{{if and .root.IsViewTag (not .noTag)}}{{.root.TagName}}{{else if .root.IsViewBranch}}{{.root.BranchName}}{{else}}{{ShortSha .root.CommitID}}{{end}}</strong>
8484
{{end}}
8585
</span>
8686
{{svg "octicon-triangle-down" 14 "dropdown icon"}}

web_src/css/repo/issue-list.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040

4141
#issue-list .flex-item-body .branches .branch {
42-
background-color: var(--color-secondary-alpha-40);
42+
background-color: var(--color-secondary-alpha-50);
4343
border-radius: var(--border-radius);
4444
padding: 0 4px;
4545
}
@@ -48,7 +48,8 @@
4848
white-space: nowrap;
4949
overflow: hidden;
5050
text-overflow: ellipsis;
51-
max-width: 10em;
51+
max-width: 200px;
52+
display: block;
5253
}
5354

5455
#issue-list .flex-item-body .checklist progress {

web_src/js/components/RepoBranchTagSelector.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ export default sfc; // activate IDE's Vue plugin
248248
<template>
249249
<div class="ui dropdown custom">
250250
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button tw-flex tw-m-0" @click="menuVisible = !menuVisible" @keyup.enter="menuVisible = !menuVisible">
251-
<span class="text tw-flex tw-items-center tw-mr-1">
251+
<span class="text tw-flex tw-items-center tw-mr-1 gt-ellipsis">
252252
<template v-if="release">{{ textReleaseCompare }}</template>
253253
<template v-else>
254254
<svg-icon v-if="isViewTag" name="octicon-tag"/>
255255
<svg-icon v-else name="octicon-git-branch"/>
256-
<strong ref="dropdownRefName" class="tw-ml-2">{{ refNameText }}</strong>
256+
<strong ref="dropdownRefName" class="tw-ml-2 tw-inline-block gt-ellipsis">{{ refNameText }}</strong>
257257
</template>
258258
</span>
259259
<svg-icon name="octicon-triangle-down" :size="14" class-name="dropdown icon"/>

0 commit comments

Comments
 (0)