From d42015e6eb382058ad915a7a5a5789424bb53014 Mon Sep 17 00:00:00 2001 From: Hester Gong Date: Sun, 19 Mar 2023 00:07:59 +0800 Subject: [PATCH] Fix long name ui issues and label ui issue (#23541) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes some ui problems as mentioned in the two issues below. 1. Long file path has no word break ## Before 截屏2023-03-17 17 49 43 ## After 截屏2023-03-17 17 51 22 on mobile 截屏2023-03-17 17 51 15 2. Texts in labels ## Before 截屏2023-03-17 17 49 24 ## After 截屏2023-03-17 17 51 31 with two labels 截屏2023-03-17 17 51 53 In explore and star pages 截屏2023-03-17 18 25 00 截屏2023-03-17 18 25 09 3. Long name repository on creating new fork page ## Before 截屏2023-03-17 17 50 01 ## After 截屏2023-03-17 17 50 37 截屏2023-03-17 17 50 48 Closes #23535 Closes #23534 --- templates/explore/repo_list.tmpl | 2 +- templates/repo/pulls/fork.tmpl | 2 +- web_src/css/explore.css | 5 +++++ web_src/css/form.css | 7 ++++--- web_src/css/repository.css | 4 ++++ web_src/css/user.css | 5 +++++ 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index 6650e6073f..288313c7d4 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -10,7 +10,7 @@ {{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} -
+
{{if .IsArchived}} {{$.locale.Tr "repo.desc.archived"}} {{end}} diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl index 930d5afa69..34adc7b2f1 100644 --- a/templates/repo/pulls/fork.tmpl +++ b/templates/repo/pulls/fork.tmpl @@ -37,7 +37,7 @@
- {{.ForkRepo.FullName}} + {{.ForkRepo.FullName}}
diff --git a/web_src/css/explore.css b/web_src/css/explore.css index 8543702252..e3f9dddc58 100644 --- a/web_src/css/explore.css +++ b/web_src/css/explore.css @@ -41,6 +41,11 @@ margin-bottom: 0.5rem; } +.ui.repository.list .repo-title .labels { + word-break: normal; + flex-shrink: 0; +} + .ui.repository.branches .info { font-size: 12px; color: var(--color-text-light); diff --git a/web_src/css/form.css b/web_src/css/form.css index e325a377f8..324a210f4f 100644 --- a/web_src/css/form.css +++ b/web_src/css/form.css @@ -479,7 +479,8 @@ textarea:focus, .repository.new.repo form .selection.dropdown, .repository.new.migrate form .selection.dropdown, -.repository.new.fork form .selection.dropdown { +.repository.new.fork form .selection.dropdown, +.repository.new.fork form .field a { vertical-align: middle; width: 50% !important; } @@ -491,6 +492,7 @@ textarea:focus, .repository.new.repo form input, .repository.new.migrate form input, .repository.new.fork form input, + .repository.new.fork form .field a, .repository.new.repo form .selection.dropdown, .repository.new.migrate form .selection.dropdown, .repository.new.fork form .selection.dropdown { @@ -500,8 +502,7 @@ textarea:focus, .repository.new.migrate form .field button, .repository.new.fork form .field button, .repository.new.repo form .field a, - .repository.new.migrate form .field a, - .repository.new.fork form .field a { + .repository.new.migrate form .field a { margin-bottom: 1em; width: 100%; } diff --git a/web_src/css/repository.css b/web_src/css/repository.css index d2040ec0ac..2708cf4d47 100644 --- a/web_src/css/repository.css +++ b/web_src/css/repository.css @@ -214,6 +214,10 @@ font-size: 1.2em; } +.repository.file.list .repo-path { + word-break: break-word; +} + .repository.file.list .repo-path .section, .repository.file.list .repo-path .divider { display: inline; diff --git a/web_src/css/user.css b/web_src/css/user.css index adf865496b..a3379440df 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -67,6 +67,11 @@ margin-top: 25px; } +.user.profile .ui.repository.list .repo-title .labels { + word-break: normal; + flex-shrink: 0; +} + .user.profile #loading-heatmap { margin-bottom: 1em; }