1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Improve mobile review ui (#31091) (#31136)

Backport #31091 by @silverwind

Fixes: https://github.com/go-gitea/gitea/issues/31071

Not perfect but much better than before.

Before: Overflows, sticky not working, filename unreadable:

<img width="506" alt="Screenshot 2024-05-27 at 02 02 40"
src="https://github.com/go-gitea/gitea/assets/115237/a06b1edf-dece-4402-98c2-68670fca265f">

After:
<img width="457" alt="Screenshot 2024-05-27 at 01 59 06"
src="https://github.com/go-gitea/gitea/assets/115237/2a282c96-e719-4554-b418-81963ae6269c">

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Giteabot
2024-05-28 22:10:01 +08:00
committed by GitHub
parent e6bacf1fed
commit b615a59db8
7 changed files with 69 additions and 112 deletions

View File

@@ -824,8 +824,7 @@ td .commit-summary {
padding-top: 0;
}
.repository.view.issue .comment-list .timeline-item.commits-list .ui.avatar,
.repository.view.issue .comment-list .timeline-item.event .ui.avatar {
.repository.view.issue .comment-list .timeline-item.commits-list .ui.avatar {
margin-right: 0.25em;
}
@@ -1037,10 +1036,6 @@ td .commit-summary {
margin-top: 6px;
}
.repository.view.issue .comment-list .comment > .avatar ~ .content {
margin-left: 42px;
}
.repository.view.issue .comment-list .comment-code-cloud button.comment-form-reply {
margin: 0;
}
@@ -1064,12 +1059,6 @@ td .commit-summary {
box-shadow: none;
}
@media (max-width: 767.98px) {
.repository.view.issue .comment-list {
padding: 1rem 0 !important; /* Important is required here to override existing fomantic styles. */
}
}
.repository.view.issue .ui.depending .item.is-closed .title {
text-decoration: line-through;
}
@@ -1551,39 +1540,6 @@ td .commit-summary {
height: 30px;
}
.repository .diff-box .header:not(.resolved-placeholder) {
display: flex;
align-items: center;
}
.repository .diff-box .header:not(.resolved-placeholder) .file {
min-width: 0;
}
.repository .diff-box .header:not(.resolved-placeholder) .file .file-link {
max-width: fit-content;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.repository .diff-box .header:not(.resolved-placeholder) .button {
padding: 0 12px;
flex: 0 0 auto;
margin-right: 0;
height: 30px;
}
.repository .diff-box .resolved-placeholder {
display: flex;
align-items: center;
font-size: 14px !important;
height: 36px;
padding-top: 0;
padding-bottom: 0;
}
.repository .diff-box .resolved-placeholder .button {
padding: 8px 12px;
}
@@ -2428,6 +2384,10 @@ tbody.commit-list {
}
.resolved-placeholder {
display: flex;
align-items: center;
font-size: 14px !important;
padding: 8px !important;
font-weight: var(--font-weight-normal) !important;
border: 1px solid var(--color-secondary) !important;
border-radius: var(--border-radius) !important;
@@ -2537,6 +2497,38 @@ tbody.commit-list {
.diff-file-header {
padding: 5px 8px !important;
box-shadow: 0 -1px 0 1px var(--color-body); /* prevent borders being visible behind top corners when sticky and scrolled */
font-weight: var(--font-weight-normal);
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.diff-file-header .file {
min-width: 0;
}
.diff-file-header .file-link {
max-width: fit-content;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
overflow-wrap: anywhere;
}
.diff-file-header .button {
padding: 0 12px;
flex: 0 0 auto;
margin-right: 0;
height: 30px;
}
@media (max-width: 767.98px) {
.diff-file-header {
flex-direction: column;
align-items: stretch;
}
}
.diff-file-box[data-folded="true"] .diff-file-body {