-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add wrapper to author to avoid long name ui problem #23030
Add wrapper to author to avoid long name ui problem #23030
Conversation
templates/repo/view_list.tmpl
Outdated
@@ -8,14 +8,14 @@ | |||
{{if .LatestCommitUser}} | |||
{{avatar $.Context .LatestCommitUser 24}} | |||
{{if .LatestCommitUser.FullName}} | |||
<a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a> | |||
<span class="author-wrapper" title="{{.LatestCommitUser.FullName}}"><a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not put these styles and title on <a>
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not put these styles and title on
<a>
directly?
Yes that is better putting them directly on <a>
tag here. Changed that.
I think the answer would be "flex". These |
Flex could fix it, but might need more code changes like overriding of padding introduced by fomantic |
Also need to change in other media queries. I will write the optimal values in the near future. |
diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less
index e5f879e9e..5604386ba 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;
}
}
Maybe not perfect, but I think it's a good option without using flex and a lot of code changes. |
added a commit to use these values @Maks1mS, please check. |
🎺 🤖 |
This PR is a possible solution for issue go-gitea#22866. Main change is to add a `author-wrapper` class around author name, like the wrapper added to message. The `max-width` is set to 200px on PC, and 100px on mobile device for now.
Backport #23030 This PR is a possible solution for issue #22866. Main change is to add a `author-wrapper` class around author name, like the wrapper added to message. The `max-width` is set to 200px on PC, and 100px on mobile device for now. Which will work like below: <img width="1183" alt="2023-02-21 11 57 53" src="https://user-images.githubusercontent.com/17645053/220244146-3d47c512-33b6-4ed8-938e-de0a8bc26ffb.png"> <img width="417" alt="2023-02-21 11 58 43" src="https://user-images.githubusercontent.com/17645053/220244154-1ea0476b-9d1c-473a-9917-d3216860f9a9.png"> And `title` is added to the wrapper like it did in message wrapper. So the full author name will show on hover. Co-authored-by: HesterG <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
* giteaofficial/main: Make issue meta dropdown support Enter, confirm before reloading (go-gitea#23014) Fix SyncOnCommit always return false in API of push_mirrors (go-gitea#23088) Fix commit name in Apply Patch page (go-gitea#23086) Add wrapper to author to avoid long name ui problem (go-gitea#23030) Avoid Hugo from adding quote to actions url (go-gitea#23097) Remove all package data after tests (go-gitea#22984) Change style to improve whitespaces trimming inside inline markdown code (go-gitea#23093) Nest metadata in refactoring docs (go-gitea#23087) # Conflicts: # templates/repo/issue/view_content/context_menu.tmpl
Please send backport to v1.18 |
Backport #23030 This PR is a possible solution for issue #22866. Main change is to add a `author-wrapper` class around author name, like the wrapper added to message. The `max-width` is set to 200px on PC, and 100px on mobile device for now. Which will work like below: <img width="1183" alt="2023-02-21 11 57 53" src="https://user-images.githubusercontent.com/17645053/220244146-3d47c512-33b6-4ed8-938e-de0a8bc26ffb.png"> <img width="417" alt="2023-02-21 11 58 43" src="https://user-images.githubusercontent.com/17645053/220244154-1ea0476b-9d1c-473a-9917-d3216860f9a9.png"> And `title` is added to the wrapper like it did in message wrapper. So the full author name will show on hover.
Close #22866. Main change is to add a
author-wrapper
class around author name, like the wrapper added to message. Themax-width
is set to 200px on PC, and 100px on mobile device for now. Which will work like below:And
title
is added to the wrapper like it did in message wrapper. So the full author name will show on hover.