Skip to content

Commit 533b8b2

Browse files
kerwin612wxiaoguanglunny
authored
Fix button alignments (#34276)
Continue with #34206. --------- Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
1 parent 0376c09 commit 533b8b2

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

templates/repo/branch_dropdown.tmpl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,20 @@ Search "repo/branch_dropdown" in the template directory to find all occurrences.
4747
>
4848
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}}
4949
<div class="ui dropdown custom branch-selector-dropdown ellipsis-text-items">
50-
<div class="ui button branch-dropdown-button">
50+
<div class="ui compact button branch-dropdown-button">
5151
<span class="flex-text-block gt-ellipsis">
52-
{{if not .DropdownFixedText}}
53-
{{if .ShowTabTags}}
52+
{{if .DropdownFixedText}}
53+
{{.DropdownFixedText}}
54+
{{else}}
55+
{{if eq .CurrentRefType "tag"}}
5456
{{svg "octicon-tag"}}
55-
{{else if .ShowTabBranches}}
57+
{{else if eq .CurrentRefType "branch"}}
5658
{{svg "octicon-git-branch"}}
59+
{{else}}
60+
{{svg "octicon-git-commit"}}
5761
{{end}}
62+
<strong class="tw-inline-block gt-ellipsis">{{.CurrentRefShortName}}</strong>
5863
{{end}}
59-
<strong class="tw-ml-2 tw-inline-block gt-ellipsis">{{Iif .DropdownFixedText .SelectedRefShortName}}</strong>
6064
</span>
6165
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
6266
</div>

templates/repo/wiki/revision.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</div>
1515
</div>
1616
</div>
17-
<div>
17+
<div class="flex-text-block">
1818
{{template "repo/clone_panel" .}}
1919
</div>
2020
</div>

web_src/css/base.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,7 @@ table th[data-sortt-desc] .svg {
11501150
min-width: 0;
11511151
}
11521152

1153+
.ui.dropdown > .ui.button,
11531154
.flex-text-block > .ui.button,
11541155
.flex-text-inline > .ui.button {
11551156
margin: 0; /* fomantic buttons have default margin, when we use them in a flex container with gap, we do not need these margins */

web_src/js/components/RepoBranchTagSelector.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ export default defineComponent({
222222
<template v-if="dropdownFixedText">{{ dropdownFixedText }}</template>
223223
<template v-else>
224224
<svg-icon v-if="currentRefType === 'tag'" name="octicon-tag"/>
225-
<svg-icon v-else name="octicon-git-branch"/>
225+
<svg-icon v-else-if="currentRefType === 'branch'" name="octicon-git-branch"/>
226+
<svg-icon v-else name="octicon-git-commit"/>
226227
<strong ref="dropdownRefName" class="tw-inline-block gt-ellipsis">{{ currentRefShortName }}</strong>
227228
</template>
228229
</span>

web_src/js/components/RepoContributors.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export default defineComponent({
354354
<div>
355355
<!-- Contribution type -->
356356
<div class="ui floating dropdown jump" id="repo-contributors">
357-
<div class="ui basic compact button tw-mr-0">
357+
<div class="ui basic compact button">
358358
<span class="not-mobile">{{ locale.filterLabel }}</span> <strong>{{ locale.contributionType[type] }}</strong>
359359
<svg-icon name="octicon-triangle-down" :size="14"/>
360360
</div>

0 commit comments

Comments
 (0)