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 dropdown icon layout on diff page (#25397) #25403

Merged
merged 1 commit into from
Jun 21, 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/package/shared/cleanup_rules/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{range .CleanupRules}}
<div class="item">
<div class="right floated content">
<div class="ui dropdown tiny basic button icon-button">
<div class="ui dropdown tiny basic button">
{{svg "octicon-kebab-horizontal"}}
<div class="menu">
<a class="item" href="{{$.Link}}/rules/{{.ID}}">{{$.locale.Tr "edit"}}</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/new_review.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="review-box">
<button class="ui tiny green button gt-ml-2 gt-mr-0 js-btn-review">
<button class="ui tiny green button gt-pr-2 gt-df js-btn-review">
{{.locale.Tr "repo.diff.review"}}
<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/options_dropdown.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ui dropdown tiny basic button icon-button" data-tooltip-content="{{.locale.Tr "repo.diff.options_button"}}">
<div class="ui dropdown tiny basic button" data-tooltip-content="{{.locale.Tr "repo.diff.options_button"}}">
{{svg "octicon-kebab-horizontal"}}
<div class="menu">
<a class="item" id="show-file-list-btn">{{.locale.Tr "repo.diff.show_diff_stats"}}</a>
Expand Down
5 changes: 2 additions & 3 deletions templates/repo/diff/whitespace_dropdown.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<div class="ui dropdown tiny basic button icon-button" data-tooltip-content="{{.locale.Tr "repo.diff.whitespace_button"}}">
<div class="ui dropdown tiny basic button" data-tooltip-content="{{.locale.Tr "repo.diff.whitespace_button"}}">
{{svg "gitea-whitespace"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu">
<a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=show-all">
<label class="gt-pointer-events-none">
Expand Down Expand Up @@ -28,4 +27,4 @@
</a>
</div>
</div>
<a class="ui tiny basic button icon-button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}&whitespace={{$.WhitespaceBehavior}}" data-tooltip-content="{{if .IsSplitStyle}}{{.locale.Tr "repo.diff.show_unified_view"}}{{else}}{{.locale.Tr "repo.diff.show_split_view"}}{{end}}">{{if .IsSplitStyle}}{{svg "gitea-join"}}{{else}}{{svg "gitea-split"}}{{end}}</a>
<a class="ui tiny basic button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}&whitespace={{$.WhitespaceBehavior}}" data-tooltip-content="{{if .IsSplitStyle}}{{.locale.Tr "repo.diff.show_unified_view"}}{{else}}{{.locale.Tr "repo.diff.show_split_view"}}{{end}}">{{if .IsSplitStyle}}{{svg "gitea-join"}}{{else}}{{svg "gitea-split"}}{{end}}</a>
6 changes: 0 additions & 6 deletions web_src/css/modules/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
color: var(--color-red);
}

/* try to match button with no icons in height */
.icon-button {
padding-top: 7.42px !important;
padding-bottom: 7.42px !important;
}

/* btn is a plain button without any opinionated styling */

.btn {
Expand Down
5 changes: 3 additions & 2 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1666,8 +1666,9 @@
background-color: var(--color-teal);
}

.repository .diff-detail-box .button {
padding: 8px 12px;
.repository .diff-detail-box .ui.button {
padding: 0 12px;
height: 30px;
}

.repository .diff-box .header:not(.resolved-placeholder) {
Expand Down