Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some UI alignments #25277

Merged
merged 2 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/repo/commits.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{template "repo/header" .}}
<div class="ui container">
{{template "repo/sub_menu" .}}
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw gt-mb-4 gt-mt-3">
<div class="repo-button-row">
<div class="gt-df gt-ac">
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
Expand Down
8 changes: 4 additions & 4 deletions templates/repo/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</div>
{{end}}
{{template "repo/sub_menu" .}}
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw">
<div class="repo-button-row">
<div class="gt-df gt-ac gt-fw gt-gap-y-3">
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}}
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
Expand All @@ -84,8 +84,9 @@
{{end}}

{{if and .CanWriteCode .IsViewBranch (not .Repository.IsArchived)}}
<button class="ui basic compact dropdown jump icon button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}>
<span class="text">{{.locale.Tr "repo.editor.add_file"}}</span>
<button class="ui dropdown basic compact jump button gt-mr-2"{{if not .Repository.CanEnableEditor}} disabled{{end}}>
{{.locale.Tr "repo.editor.add_file"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu">
<a class="item" href="{{.RepoLink}}/_new/{{.BranchName | PathEscapeSegments}}/{{.TreePath | PathEscapeSegments}}">
{{.locale.Tr "repo.editor.new_file"}}
Expand All @@ -99,7 +100,6 @@
{{.locale.Tr "repo.editor.patch"}}
</a>
</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</button>
{{end}}

Expand Down
2 changes: 1 addition & 1 deletion templates/repo/wiki/view.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{template "repo/header" .}}
{{$title := .title}}
<div class="ui container">
<div class="repo-button-row gt-df gt-ac gt-sb gt-fw">
<div class="repo-button-row">
<div class="gt-df gt-ac">
<div class="ui floating filter dropdown" data-no-results="{{.locale.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">
Expand Down
4 changes: 2 additions & 2 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2099,8 +2099,8 @@ a.ui.basic.label:hover {
}

/* if a .top.attached.header is followed by a .segment, add some margin */
.ui.segments ~ .ui.top.attached.header,
.ui.attached.segment ~ .ui.top.attached.header {
.ui.segments + .ui.top.attached.header,
.ui.attached.segment + .ui.top.attached.header {
margin-top: 1rem;
}

Expand Down
23 changes: 10 additions & 13 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -2693,26 +2693,23 @@
}

.repo-button-row {
margin-bottom: 10px;
}

.repo-button-row > * {
margin-top: 8px;
}

.wiki .repo-button-row {
margin-bottom: 0;
}

.wiki .repo-button-row > * {
margin-top: 0;
margin: 10px 0;
display: flex;
align-items: center;
gap: 0.5em;
flex-wrap: wrap;
justify-content: space-between;
}

.repo-button-row .button {
padding: 6px 10px !important;
height: 30px;
}

.repo-button-row .button.dropdown {
padding-right: 22px !important; /* normal buttons have !important paddings, so we need to override it for dropdown (Add File) icons */
}

.repo-button-row input {
height: 30px;
}
Expand Down