Skip to content
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 and Style #25029

Conversation

puni9869
Copy link
Member

@puni9869 puni9869 commented May 31, 2023

Fix ::User Profile Page Project Tab Have Inconsistent Layout and Style
Added the big_avator for consistency in the all header_items tabs.

#24871

Description

in the user profile page the Packages and Projects tab have small icons for user but other tabs have bigger profile picture with user info:

Screenshots

For Packages And Projects:

image

For Other Tabs:

image

Before

image

After changes

Project View
image

Packages View
image

Org view for projects page

image

Org view for packages page

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 31, 2023
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 31, 2023
@puni9869 puni9869 changed the title Fix ::User Profile Page Tabs Have Inconsistent Layout and Style Fix ::User Profile Page - Project/Packages Tabs Have Inconsistent Layout and Style May 31, 2023
@puni9869 puni9869 changed the title Fix ::User Profile Page - Project/Packages Tabs Have Inconsistent Layout and Style [WIP] Fix ::User Profile Page - Project/Packages Tabs Have Inconsistent Layout and Style May 31, 2023
@puni9869 puni9869 marked this pull request as draft May 31, 2023 22:21
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 1, 2023
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 1, 2023
@puni9869 puni9869 marked this pull request as ready for review June 1, 2023 19:28
@puni9869 puni9869 changed the title [WIP] Fix ::User Profile Page - Project/Packages Tabs Have Inconsistent Layout and Style Fix ::User Profile Page - Project/Packages Tabs Have Inconsistent Layout and Style Jun 1, 2023
@puni9869
Copy link
Member Author

puni9869 commented Jun 1, 2023

@silverwind

ctx.Data["NumFollowing"] = numFollowing
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate
ctx.Data["EnableFeed"] = setting.Other.EnableFeed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this code block from and can we maybe re-use a function between the two?

@@ -1917,6 +1921,11 @@
padding-bottom: 100px;
}

.page-content .ui.ui.ui.container:not(.fluid) .empty {
Copy link
Member

@silverwind silverwind Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.empty seems an awefully generic class name. Can you be more specific, and is this prefix really needed?

@silverwind
Copy link
Member

silverwind commented Jun 1, 2023

So this PR introduces 3 big template files, without removing the content anywhere else, so I assume this must by copy-pasted content, which we should avoid as it hurts maintainability having to do a change in many copy-pasted files (and often forgetting some places).

Instead of copying, is it possible to move only the reusable parts into shared folder in templates, and then importing it in 2 places? You can use the dict helper to pass context and if there are differences, the same helper can be used to add additional values into the dict.

Same duplication issue may apply to the go code as well, I'm not sure.

+490 −12 is certainly not a good-looking diffstat for such a refactor.

@puni9869
Copy link
Member Author

puni9869 commented Jun 1, 2023

Yes you are correct. I took the basic approach to fix this. But I like you suggestion on reusability. I will work on the reformatting and reducing the duplicate code.
💯

@puni9869
Copy link
Member Author

puni9869 commented Jun 6, 2023

Moved to #25108

@puni9869 puni9869 closed this Jun 6, 2023
@puni9869 puni9869 deleted the punit/ISSUE-24871-fixing-user-profile-page branch June 6, 2023 18:06
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants