Skip to content

Commit d42015e

Browse files
authored
Fix long name ui issues and label ui issue (#23541)
This PR fixes some ui problems as mentioned in the two issues below. 1. Long file path has no word break ## Before <img width="1357" alt="截屏2023-03-17 17 49 43" src="https://user-images.githubusercontent.com/17645053/225873491-27c7bf9a-d5d5-4065-9e4a-ff228e935abf.png"> ## After <img width="1248" alt="截屏2023-03-17 17 51 22" src="https://user-images.githubusercontent.com/17645053/225873562-93b87af7-9c83-43f8-aa0d-36a9174d25ac.png"> on mobile <img width="408" alt="截屏2023-03-17 17 51 15" src="https://user-images.githubusercontent.com/17645053/225873554-1b8c8999-1dfc-4251-a7fc-20ecd3444cb0.png"> 2. Texts in labels ## Before <img width="1219" alt="截屏2023-03-17 17 49 24" src="https://user-images.githubusercontent.com/17645053/225873369-812b1b52-c104-4e32-988f-c3e55ad2f844.png"> ## After <img width="1259" alt="截屏2023-03-17 17 51 31" src="https://user-images.githubusercontent.com/17645053/225873317-9717fd2c-e9e1-4a00-a27d-6bdc5933c3ca.png"> with two labels <img width="1258" alt="截屏2023-03-17 17 51 53" src="https://user-images.githubusercontent.com/17645053/225873323-13198192-71de-472d-8e78-6fd86ddba3d9.png"> In explore and star pages <img width="896" alt="截屏2023-03-17 18 25 00" src="https://user-images.githubusercontent.com/17645053/225878962-9e26e3aa-cff0-451c-9133-19f4ad1507a4.png"> <img width="913" alt="截屏2023-03-17 18 25 09" src="https://user-images.githubusercontent.com/17645053/225878967-6adaa414-136e-43c2-87d0-7e46a0da112e.png"> 3. Long name repository on creating new fork page ## Before <img width="919" alt="截屏2023-03-17 17 50 01" src="https://user-images.githubusercontent.com/17645053/225873723-5c4ea137-3b51-4074-a458-ef442e330ddf.png"> ## After <img width="907" alt="截屏2023-03-17 17 50 37" src="https://user-images.githubusercontent.com/17645053/225873772-fc4a52c3-49c6-4ca6-903d-a13707f2a98b.png"> <img width="383" alt="截屏2023-03-17 17 50 48" src="https://user-images.githubusercontent.com/17645053/225873779-6de1dfde-5c05-4ae9-89e1-85c25b3a1682.png"> Closes #23535 Closes #23534
1 parent 48f6805 commit d42015e

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

Diff for: templates/explore/repo_list.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<a class="name" href="{{.Link}}">
1111
{{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
1212
</a>
13-
<div class="labels gt-df gt-ac gt-fw">
13+
<div class="labels gt-df gt-ac gt-fw gt-mr-3">
1414
{{if .IsArchived}}
1515
<span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
1616
{{end}}

Diff for: templates/repo/pulls/fork.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
<div class="inline field">
3939
<label>{{.locale.Tr "repo.fork_from"}}</label>
40-
<a href="{{.ForkRepo.Link}}">{{.ForkRepo.FullName}}</a>
40+
<a href="{{.ForkRepo.Link}}" class="gt-dib">{{.ForkRepo.FullName}}</a>
4141
</div>
4242
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
4343
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>

Diff for: web_src/css/explore.css

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
margin-bottom: 0.5rem;
4242
}
4343

44+
.ui.repository.list .repo-title .labels {
45+
word-break: normal;
46+
flex-shrink: 0;
47+
}
48+
4449
.ui.repository.branches .info {
4550
font-size: 12px;
4651
color: var(--color-text-light);

Diff for: web_src/css/form.css

+4-3
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,8 @@ textarea:focus,
479479

480480
.repository.new.repo form .selection.dropdown,
481481
.repository.new.migrate form .selection.dropdown,
482-
.repository.new.fork form .selection.dropdown {
482+
.repository.new.fork form .selection.dropdown,
483+
.repository.new.fork form .field a {
483484
vertical-align: middle;
484485
width: 50% !important;
485486
}
@@ -491,6 +492,7 @@ textarea:focus,
491492
.repository.new.repo form input,
492493
.repository.new.migrate form input,
493494
.repository.new.fork form input,
495+
.repository.new.fork form .field a,
494496
.repository.new.repo form .selection.dropdown,
495497
.repository.new.migrate form .selection.dropdown,
496498
.repository.new.fork form .selection.dropdown {
@@ -500,8 +502,7 @@ textarea:focus,
500502
.repository.new.migrate form .field button,
501503
.repository.new.fork form .field button,
502504
.repository.new.repo form .field a,
503-
.repository.new.migrate form .field a,
504-
.repository.new.fork form .field a {
505+
.repository.new.migrate form .field a {
505506
margin-bottom: 1em;
506507
width: 100%;
507508
}

Diff for: web_src/css/repository.css

+4
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@
214214
font-size: 1.2em;
215215
}
216216

217+
.repository.file.list .repo-path {
218+
word-break: break-word;
219+
}
220+
217221
.repository.file.list .repo-path .section,
218222
.repository.file.list .repo-path .divider {
219223
display: inline;

Diff for: web_src/css/user.css

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@
6767
margin-top: 25px;
6868
}
6969

70+
.user.profile .ui.repository.list .repo-title .labels {
71+
word-break: normal;
72+
flex-shrink: 0;
73+
}
74+
7075
.user.profile #loading-heatmap {
7176
margin-bottom: 1em;
7277
}

0 commit comments

Comments
 (0)