From d6b0b5c8665493a2765b3481cc108c813d77400b Mon Sep 17 00:00:00 2001 From: HesterG Date: Tue, 21 Feb 2023 11:52:29 +0800 Subject: [PATCH 1/8] add wrapper to author to avoid long name ui problem --- templates/repo/view_list.tmpl | 6 +++--- web_src/less/_repository.less | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 6fcf60daef135..651f217ecd5c4 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -8,14 +8,14 @@ {{if .LatestCommitUser}} {{avatar $.Context .LatestCommitUser 24}} {{if .LatestCommitUser.FullName}} - {{.LatestCommitUser.FullName}} + {{.LatestCommitUser.FullName}} {{else}} - {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} + {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} {{end}} {{else}} {{if .LatestCommit.Author}} {{avatarByEmail $.Context .LatestCommit.Author.Email .LatestCommit.Author.Name 24}} - {{.LatestCommit.Author.Name}} + {{.LatestCommit.Author.Name}} {{end}} {{end}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index f489335712abf..52d31fb0e5742 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2914,7 +2914,7 @@ tbody.commit-list { vertical-align: baseline; } -.message-wrapper { +.message-wrapper, .author-wrapper { overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 50px); @@ -2922,6 +2922,10 @@ tbody.commit-list { vertical-align: middle; } +.author-wrapper { + max-width: 200px; +} + // in the commit list, messages can wrap so we can use inline .commit-list .message-wrapper { display: inline; @@ -2941,6 +2945,10 @@ tbody.commit-list { display: block; max-width: calc(100vw - 70px); } + + .author-wrapper { + max-width: 100px; + } } @media @mediaMd { From abc9931440cf6bbf1c3b388d594d0013f7615907 Mon Sep 17 00:00:00 2001 From: HesterG Date: Tue, 21 Feb 2023 13:13:23 +0800 Subject: [PATCH 2/8] remove span for links and fix lint --- templates/repo/view_list.tmpl | 4 ++-- web_src/less/_repository.less | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 651f217ecd5c4..87fcbb8276bcd 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -8,9 +8,9 @@ {{if .LatestCommitUser}} {{avatar $.Context .LatestCommitUser 24}} {{if .LatestCommitUser.FullName}} - {{.LatestCommitUser.FullName}} + {{.LatestCommitUser.FullName}} {{else}} - {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} + {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} {{end}} {{else}} {{if .LatestCommit.Author}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 52d31fb0e5742..6b6613941646c 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2914,7 +2914,8 @@ tbody.commit-list { vertical-align: baseline; } -.message-wrapper, .author-wrapper { +.message-wrapper, +.author-wrapper { overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 50px); From beb9c86cb9b43970f594ed065acfc9f612916d74 Mon Sep 17 00:00:00 2001 From: HesterG Date: Tue, 21 Feb 2023 13:33:21 +0800 Subject: [PATCH 3/8] fix lint --- web_src/less/_repository.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 6b6613941646c..b91f4504e6f1f 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2914,7 +2914,7 @@ tbody.commit-list { vertical-align: baseline; } -.message-wrapper, +.message-wrapper, .author-wrapper { overflow: hidden; text-overflow: ellipsis; From a2a62d9a06b8fc3fa151e8e187bd49f65722397d Mon Sep 17 00:00:00 2001 From: nickname Date: Tue, 21 Feb 2023 13:55:22 +0800 Subject: [PATCH 4/8] remove span --- templates/repo/view_list.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 87fcbb8276bcd..9540c872c2c5c 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -10,7 +10,7 @@ {{if .LatestCommitUser.FullName}} {{.LatestCommitUser.FullName}} {{else}} - {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} + {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} {{end}} {{else}} {{if .LatestCommit.Author}} From 15ed4b07cb2e1efc9dc9b9b34cc1f2f010befbc0 Mon Sep 17 00:00:00 2001 From: nickname Date: Wed, 22 Feb 2023 09:16:11 +0800 Subject: [PATCH 5/8] table layout --- web_src/less/_repository.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 21b38077e6c0e..d21b0751c5409 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -237,6 +237,8 @@ } #repo-files-table { + table-layout: fixed; + thead { th { padding-top: 8px; @@ -2900,7 +2902,7 @@ tbody.commit-list { } .author-wrapper { - max-width: 200px; + max-width: 180px; } // in the commit list, messages can wrap so we can use inline From 97b9ed5d191b631258d6ff35f7c0f1fe67c97600 Mon Sep 17 00:00:00 2001 From: HesterG Date: Wed, 22 Feb 2023 09:31:11 +0800 Subject: [PATCH 6/8] adjust mobile --- web_src/less/_repository.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index d21b0751c5409..24ddd7b7a9468 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -238,7 +238,7 @@ #repo-files-table { table-layout: fixed; - + thead { th { padding-top: 8px; @@ -2926,7 +2926,7 @@ tbody.commit-list { } .author-wrapper { - max-width: 100px; + max-width: 80px; } } From 18ca20fda706538cc7e4be16306f39d4d9935005 Mon Sep 17 00:00:00 2001 From: HesterG Date: Wed, 22 Feb 2023 09:34:54 +0800 Subject: [PATCH 7/8] shorter long msg --- web_src/less/_repository.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 24ddd7b7a9468..e5f879e9e6054 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2956,7 +2956,7 @@ tbody.commit-list { } th .message-wrapper { - max-width: 680px; + max-width: 650px; } } From 302fd158f7340df4afa31b8d374e1b390312bea7 Mon Sep 17 00:00:00 2001 From: HesterG Date: Wed, 22 Feb 2023 14:22:07 +0800 Subject: [PATCH 8/8] change to better width for long msg --- web_src/less/_repository.less | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index e5f879e9e6054..5604386baf519 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -2936,7 +2936,7 @@ tbody.commit-list { } th .message-wrapper { - max-width: 280px; + max-width: 120px; } } @@ -2946,7 +2946,7 @@ tbody.commit-list { } th .message-wrapper { - max-width: 490px; + max-width: 350px; } } @@ -2956,7 +2956,7 @@ tbody.commit-list { } th .message-wrapper { - max-width: 650px; + max-width: 525px; } }