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

GitHub like repo home page #27931

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

Conversation

yp05327
Copy link
Contributor

@yp05327 yp05327 commented Nov 6, 2023

In the repo home page of GitHub, user can quickly get the latest release, contributors, and other useful information.

And the main point is that we can:

  • add contributors page which will be provided in Implement contributors graph #27882
  • add GitHub's activity page (the activity page in Gitea is called Insights in GitHub)
  • add quick downloading button for the latest release
  • move the language status bar to the sidebar, then user can easily know what is that green( or other colors) bar

In desktop view:
image
In mobile view: (will not show readme button and Description title)
image
image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 6, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 6, 2023
@lng2020
Copy link
Member

lng2020 commented Nov 6, 2023

Will the language status bar move to the right side too? I always think the language status bar goes unnoticed for someone new to Gitea.

@JakobDev
Copy link
Contributor

JakobDev commented Nov 6, 2023

We already have all this Information visible on the Site.

@lng2020
Copy link
Member

lng2020 commented Nov 6, 2023

We already have all this Information visible on the Site.

So this PR want to move those information to right side to align GitHub UI.

@JakobDev
Copy link
Contributor

JakobDev commented Nov 6, 2023

I'm personal more in favour of the current concept. We have Description and Topics of the Repo on Top, which makes IMHO way more sense than on the Left.

@silverwind
Copy link
Member

silverwind commented Nov 6, 2023

Many were against this design but I guess it had to happen at some point. I guess the new layout does make better use of horizontal space. Would also be interested in how it looks on mobile.

@delvh
Copy link
Member

delvh commented Nov 6, 2023

One thing I've noticed on your screenshot:
I think we should display the release above the stats.
Most often, people want to see the release.
It is rare that you want to see how many stars a project has.

@yp05327
Copy link
Contributor Author

yp05327 commented Nov 7, 2023

I think maybe we don't need stars/forks/watching in the sidebar as they are already displayed above.

And the main point is that I want to:

  • add contributors page
  • add GitHub's activity page (the activity page in Gitea is called Insights in GitHub)
  • add quick downloading button for the latest release
  • move the language status bar to the sidebar, then user can easily know what is that green( or other colors) bar

@silverwind
Copy link
Member

silverwind commented Nov 7, 2023

Inside the ... menu is a "Cite this repository", it should be moved to sidebar as well, to the "stars" section. You need a repo like this one with a CITATION file for it to show.

@silverwind
Copy link
Member

Yeah we can omit duplicate info like stars/forks.

@yp05327
Copy link
Contributor Author

yp05327 commented Nov 7, 2023

Inside the ... menu is a "Cite this repository", it should be moved to sidebar as well, to the "stars" section. You need a repo like this one with a CITATION file.

The div of this ... menu has a display problem on mobile view.
image

@yp05327
Copy link
Contributor Author

yp05327 commented Nov 7, 2023

Cite this repository

@silverwind
It is new for me, so I tried to add the file and I got this error:
image

https://gitea.com/yp05327/testrepo

@silverwind
Copy link
Member

silverwind commented Nov 8, 2023

Definitely a bug. Does not happen on my test repo, even though the file content is the same.

@yp05327
Copy link
Contributor Author

yp05327 commented Nov 8, 2023

Definitely a bug. Does not happen on my test repo, even though the file content is the same.

I can reproduce this on my local test server which is using the latest version.

Error info:
image

@yp05327
Copy link
Contributor Author

yp05327 commented Nov 8, 2023

This error comes from line 17.
image
Then I print citationFileContent, it seems that date-released is incorrect.
image

@yp05327
Copy link
Contributor Author

yp05327 commented Nov 8, 2023

I know, we only read the first 1024 bytes of this file. So the content is cut off.
image

@yp05327
Copy link
Contributor Author

yp05327 commented Nov 8, 2023

Fix #27958

@yp05327
Copy link
Contributor Author

yp05327 commented Mar 11, 2024

@silverwind
Done

@yekanchi
Copy link

yekanchi commented Mar 11, 2024

this is great and I like the new design.
I think this red part can also be removed if it is possible to move its data to related sections.
image

@denyskon
Copy link
Member

Please don't, at least commits and branches page should be accessible from the top I think.

@silverwind
Copy link
Member

silverwind commented Mar 13, 2024

Either we go GitHub route and squeeze everything into first "line".
Or we go GitLab route that has this data in the sidebar.

But overall, I think it doesn't have to be in this PR.

@yp05327
Copy link
Contributor Author

yp05327 commented Mar 13, 2024

I prefer move repo size to right, and hold rest of them.
It is repo's information, we can move it to the right where is used to display the information.
But rest of them are quick links. they should be there, or maybe they can be in one line or other similar designs.

@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/js labels Mar 13, 2024
@yp05327
Copy link
Contributor Author

yp05327 commented Mar 26, 2024

Too many conflicts, maybe broken now.

@yp05327
Copy link
Contributor Author

yp05327 commented Mar 26, 2024

gw-font-semibold has been converted in to tw-font-semibold
but I can not find the css definition.
image

@yp05327
Copy link
Contributor Author

yp05327 commented Mar 26, 2024

I think I need to rewrite it as there are too many things changed. 😕

@silverwind
Copy link
Member

gw-font-semibold has been converted in to tw-font-semibold but I can not find the css definition.

tw-font-semibold is correct, You can use original Tailwind classes. We map them to the CSS vars which was done in #30027.

@yp05327
Copy link
Contributor Author

yp05327 commented Mar 27, 2024

Contributor stats only uses cache and it will always re-generate when the server restarts.
And it returns map so the order will be random and also include unrelated summary data in it.
There are too many problems to implement contributors in this PR, so I decide to remove it unless it can be easily be reused in other places.

@yp05327 yp05327 marked this pull request as ready for review March 27, 2024 01:59
@silverwind
Copy link
Member

Contributor stats only uses cache and it will always re-generate when the server restarts. And it returns map so the order will be random and also include unrelated summary data in it. There are too many problems to implement contributors in this PR, so I decide to remove it unless it can be easily be reused in other places.

Yeah, keep the changeset minimal so it only does the layout change.

@denyskon
Copy link
Member

denyskon commented Jul 4, 2024

@yp05327 What's the state of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code modifies/js modifies/templates This PR modifies the template files modifies/translation 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.

None yet