Skip to content

Clean up diff header css and reduce global textarea min-height #29232

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

Merged
merged 9 commits into from
Feb 18, 2024
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/commit_page.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
</div>
</div>
{{if .Commit.Signature}}
<div class="ui bottom attached message gt-text-left gt-df gt-ac gt-sb commit-header-row gt-fw {{$class}}">
<div class="ui bottom attached message gt-text-left gt-df gt-ac gt-sb commit-header-row gt-fw gt-mb-0 {{$class}}">
<div class="gt-df gt-ac">
{{if .Verification.Verified}}
{{if ne .Verification.SigningUser.ID 0}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/box.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}}
<div>
<div class="diff-detail-box diff-box">
<div class="gt-df gt-ac gt-fw">
<div class="gt-df gt-ac gt-fw gt-gap-3 gt-ml-1">
{{if $showFileTree}}
<button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
Expand Down
6 changes: 6 additions & 0 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
--border-radius-circle: 50%;
--opacity-disabled: 0.55;
--height-loading: 16rem;
--min-height-textarea: 132px; /* padding + 6 lines + border = calc(1.57142em + 6lh + 2px), but lh is not fully supported */
--tab-size: 4;
}

Expand Down Expand Up @@ -492,6 +493,11 @@ ol.ui.list li,
background: var(--color-active) !important;
}

.ui.form textarea:not([rows]) {
height: var(--min-height-textarea); /* override fomantic default 12em */
min-height: var(--min-height-textarea); /* override fomantic default 8em */
}

/* styles from removed fomantic transition module */
.hidden.transition {
visibility: hidden;
Expand Down
5 changes: 2 additions & 3 deletions web_src/css/editor/combomarkdowneditor.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@
.combo-markdown-editor textarea.markdown-text-editor {
display: block;
width: 100%;
min-height: 200px;
max-height: calc(100vh - 200px);
max-height: calc(100vh - var(--min-height-textarea));
resize: vertical;
}

.combo-markdown-editor .CodeMirror-scroll {
max-height: calc(100vh - 200px);
max-height: calc(100vh - var(--min-height-textarea));
}

/* use the same styles as markup/content.css */
Expand Down
18 changes: 1 addition & 17 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1498,12 +1498,6 @@
background: var(--color-body);
}

@media (max-width: 991.98px) {
.repository .diff-detail-box {
flex-direction: row;
}
}

@media (max-width: 480px) {
.repository .diff-detail-box {
flex-wrap: wrap;
Expand All @@ -1528,7 +1522,7 @@
color: var(--color-red);
}

@media (max-width: 991.98px) {
@media (max-width: 800px) {
.repository .diff-detail-box .diff-detail-stats {
display: none !important;
}
Expand All @@ -1538,7 +1532,6 @@
display: flex;
align-items: center;
gap: 0.25em;
flex-wrap: wrap;
justify-content: end;
}

Expand All @@ -1548,15 +1541,6 @@
margin-right: 0 !important;
}

@media (max-width: 480px) {
.repository .diff-detail-box .diff-detail-actions {
padding-top: 0.25rem;
}
.repository .diff-detail-box .diff-detail-actions .ui.button:not(.btn-submit) {
padding: 0 0.5rem;
}
}

.repository .diff-detail-box span.status {
display: inline-block;
width: 12px;
Expand Down