-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix ::User Profile Page - Project/Packages Tabs Have Inconsistent Layout #25108
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
Fix ::User Profile Page - Project/Packages Tabs Have Inconsistent Layout #25108
Conversation
Not sure if related to this PR, but I fixed this issue in e0813ef: |
This is needed. |
You mean for the code tab? Yes I could do it there as well. Also, I see I missed the |
Exactly, Thanks @silverwind for the support. |
@puni9869 Some issues:
![]() ![]()
![]() Can the tab bar template be shared to avoid these and future issues where these templates go out of sync? Code tab search looks alright and does not flash incorrect content, so needs no adjustment imho. |
Fixed this in cc79eba. |
That headerbar template is shared among all |
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.
Appears to work fine now.
looks good to me 2, thatnks |
Can we get one more approval. |
@@ -19,17 +20,16 @@ const ( | |||
|
|||
// CodeSearch render user/organization code search page | |||
func CodeSearch(ctx *context.Context) { | |||
user.RenderProfileBigAvatar(ctx) |
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.
The name and usage seems not ideal.
- The name: it doesn't "render", it only prepares some data
- If the response has been written in it, the caller shouldn't continue (by checking
Written
)
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.
Correct, and I am even in favour of changing the naming pattern, but when I see https://github.com/go-gitea/gitea/pull/25108/files/6c990c4da74a329f700ffffaa5ddfa1d6195fd7b#diff-f4279417070a8e33829c338abeb42877500377f490abb1495ae6357d50b6a765R92 in the same function doing something like that and implementation looks like this
gitea/routers/web/shared/user/header.go
Line 13 in e24f651
func RenderUserHeader(ctx *context.Context) { |
I don't want to break the pattern, if you are suggesting an explicit change in function, that I can.
In short maintainability is the real concern here.
Could you suggest something which is easier for maintainers. I have less knowledge on naming conventions.
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.
Well, the old code is buggy, so I won't say it is a must now.
@@ -1,5 +1,5 @@ | |||
<div role="main" aria-label="{{.Title}}" class="page-content repository projects"> | |||
<div class="ui container"> | |||
<div class="ui{{if .ContextUser.IsOrganization}} container{{end}}"> |
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.
That's too hacky. Why "IsOrganization" means "container"?
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.
If possible, remove the container.
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.
Unfortunately container cannot be removed, it is hacky beause we are sharing this between repository and orgransation page. I tried removing it but it will mass the whole project tab design in org view.
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.
Ok, it might be an acceptable compromise then. Didn't check the details.
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.
My opinion is that these if-else
tricks are too fragile, so I can't vote my approval, while I won't block if others like it and approve.
There are some major conflicts in this PR. Will re-write this in follow up PR. |
Fix ::User Profile Page Project Tab Have Inconsistent Layout and Style
Added the big_avator for consistency in the all header_items tabs.
#24871
Before
After changes
Project View

Packages View

Org view for projects page
Org view for packages page