summaryrefslogtreecommitdiffstats
path: root/web_src/css/repo.css
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-04-10 08:13:22 +0200
committerGergely Nagy <forgejo@gergo.csillger.hu>2024-04-15 20:01:35 +0200
commita527f5a3e72c9a2787a67ccff4623fd429fa3132 (patch)
tree3251964d101b8f4842c07ded36ea117bbcbb005a /web_src/css/repo.css
parentFix line height on inline code preview (#30372) (diff)
downloadforgejo-a527f5a3e72c9a2787a67ccff4623fd429fa3132.tar.xz
forgejo-a527f5a3e72c9a2787a67ccff4623fd429fa3132.zip
Various improvements for long file and commit names (#30374)
Fixes: https://github.com/go-gitea/gitea/issues/29438 This contains numerous enhancements for how large commit messages and large filenames render. Another notable change is that the file path is no longer cut off by backend at 30 chars, but rendered in full with wrapping. <img width="1329" alt="Screenshot 2024-04-09 at 21 53 57" src="https://github.com/go-gitea/gitea/assets/115237/5ccbb3d6-643a-4f60-ba79-3572b36d5182"> <hr> <img width="711" alt="Screenshot 2024-04-09 at 21 44 24" src="https://github.com/go-gitea/gitea/assets/115237/6ffe8fbb-407c-4aa7-b591-3d80daea7d57"> <hr> <img width="439" alt="Screenshot 2024-04-09 at 21 19 03" src="https://github.com/go-gitea/gitea/assets/115237/1ec7f6e9-2fd8-4841-87eb-6ca02ab9cd61"> <hr> <img width="444" alt="Screenshot 2024-04-09 at 21 18 52" src="https://github.com/go-gitea/gitea/assets/115237/70931b9e-5841-477e-b3bc-98f8d2662964"> --------- Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit 50099d7af436785daf66a3a9f27bd5c009f90684) Conflicts: - templates/repo/diff/box.tmpl Picked Gitea's version, because it appears we missed a gt-gap-1 => tw-gap-1 conversion - web_src/css/repo.css Conflict due to tag signature highlighting, resolved by adding the Gitea changes on top of ours manually.
Diffstat (limited to 'web_src/css/repo.css')
-rw-r--r--web_src/css/repo.css76
1 files changed, 52 insertions, 24 deletions
diff --git a/web_src/css/repo.css b/web_src/css/repo.css
index 66555cad26..bd2d2fdcfb 100644
--- a/web_src/css/repo.css
+++ b/web_src/css/repo.css
@@ -177,12 +177,44 @@
}
}
-.repository.file.list .repo-path {
- word-break: break-word;
+.commit-summary {
+ flex: 1;
+ overflow-wrap: anywhere;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
}
-.repository.file.list #repo-files-table {
- table-layout: fixed;
+.commit-header .commit-summary,
+td .commit-summary {
+ white-space: normal;
+}
+
+.latest-commit {
+ display: flex;
+ flex: 1;
+ align-items: center;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+@media (max-width: 767.98px) {
+ .latest-commit .sha {
+ display: none;
+ }
+ .latest-commit .commit-summary {
+ margin-left: 8px;
+ }
+}
+
+.repo-path {
+ display: flex;
+ overflow-wrap: anywhere;
+}
+
+/* this is what limits the commit table width to a value that works on all viewport sizes */
+#repo-files-table th:first-of-type {
+ max-width: calc(calc(min(100vw, 1280px)) - 145px - calc(2 * var(--page-margin-x)));
}
.repository.file.list #repo-files-table thead th {
@@ -262,7 +294,6 @@
}
.repository.file.list #repo-files-table td.age {
- width: 120px;
color: var(--color-text-light-1);
}
@@ -1223,10 +1254,6 @@
margin: 0;
}
-.repository #commits-table td.message {
- text-overflow: unset;
-}
-
.repository #commits-table.ui.basic.striped.table tbody tr:nth-child(2n) {
background-color: var(--color-light) !important;
}
@@ -2153,6 +2180,20 @@
display: inline-block !important;
}
+.commit-header-buttons {
+ display: flex;
+ gap: 4px;
+ align-items: flex-start;
+ white-space: nowrap;
+}
+
+@media (max-width: 767.98px) {
+ .commit-header-buttons {
+ flex-direction: column;
+ align-items: stretch;
+ }
+}
+
.settings.webhooks .list > .item:not(:first-child),
.settings.githooks .list > .item:not(:first-child),
.settings.actions .list > .item:not(:first-child) {
@@ -2384,7 +2425,7 @@ tbody.commit-list {
.author-wrapper {
overflow: hidden;
text-overflow: ellipsis;
- max-width: calc(100% - 50px);
+ max-width: 100%;
display: inline-block;
vertical-align: middle;
}
@@ -2409,10 +2450,6 @@ tbody.commit-list {
tr.commit-list {
width: 100%;
}
- th .message-wrapper {
- display: block;
- max-width: calc(100vw - 70px);
- }
.author-wrapper {
max-width: 80px;
}
@@ -2422,27 +2459,18 @@ tbody.commit-list {
tr.commit-list {
width: 723px;
}
- th .message-wrapper {
- max-width: 120px;
- }
}
@media (min-width: 992px) and (max-width: 1200px) {
tr.commit-list {
width: 933px;
}
- th .message-wrapper {
- max-width: 350px;
- }
}
@media (min-width: 1201px) {
tr.commit-list {
width: 1127px;
}
- th .message-wrapper {
- max-width: 525px;
- }
}
.commit-list .commit-status-link {
@@ -2770,7 +2798,7 @@ tbody.commit-list {
.repository.file.list #repo-files-table .entry td.message,
.repository.file.list #repo-files-table .commit-list td.message,
.repository.file.list #repo-files-table .entry span.commit-summary,
- .repository.file.list #repo-files-table .commit-list span.commit-summary {
+ .repository.file.list #repo-files-table .commit-list tr span.commit-summary {
display: none !important;
}
.repository.view.issue .comment-list .timeline,