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 #32213

Merged
merged 56 commits into from
Dec 6, 2024
Merged

Conversation

yp05327
Copy link
Member

@yp05327 yp05327 commented Oct 8, 2024

Replace #27931

Laptop View:
image
Mobile View:
image
image

Small Laptop view:
image

TODO: (in other PRs, we can improve it one by one)

  • add contributors
    why: the original PR of the implement of contributors does not contain a usable function to fetch the top contributors
  • license/readme tab.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 8, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 8, 2024
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Oct 8, 2024
@yp05327
Copy link
Member Author

yp05327 commented Oct 8, 2024

image
The table's width is controlled by this, I need some help about how to adjust it.
image

@lunny
Copy link
Member

lunny commented Oct 8, 2024

Consider expanding the screen width for a better viewing experience.

@yp05327
Copy link
Member Author

yp05327 commented Oct 8, 2024

Need more works for mobile view. desktop view is almost finished.

@yp05327
Copy link
Member Author

yp05327 commented Oct 10, 2024

In mobile view, I want to move search code and descriptions to the top of the page.
Is there any good way to do it?
In my mind, maybe we can have two elements in both side and hide one of them by css if it is mobile view or not.

@yp05327 yp05327 added the topic/ui Change the appearance of the Gitea UI label Oct 10, 2024
@yp05327

This comment was marked as resolved.

@yp05327 yp05327 changed the title WIP: GitHub like repo home page GitHub like repo home page Oct 21, 2024
@yp05327 yp05327 requested a review from silverwind October 21, 2024 00:25
@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 Oct 21, 2024
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 6, 2024
@wxiaoguang wxiaoguang marked this pull request as ready for review December 6, 2024 12:41
@wxiaoguang
Copy link
Contributor

Have done my best to fix various problems (by the way, move some code to refactor the legacy functions)

@wxiaoguang
Copy link
Contributor

@yp05327 could you take a look at whether my changes are right? If nothing wrong, we can merge it and keep improving in following PRs.

@yp05327
Copy link
Member Author

yp05327 commented Dec 6, 2024

Tooltips looks not good (especially for license, it is designed for the original UI), changed into title.

@yp05327
Copy link
Member Author

yp05327 commented Dec 6, 2024

LGTM

@hiifong
Does it work now?

@hiifong
Copy link
Member

hiifong commented Dec 6, 2024

LGTM

@hiifong Does it work now?

The layout is still broken, This time I am using a Mac system.
image

@hiifong
Copy link
Member

hiifong commented Dec 6, 2024

LGTM
@hiifong Does it work now?

The layout is still broken, This time I am using a Mac system. image

@wxiaoguang Can you fix this?

@hiifong
Copy link
Member

hiifong commented Dec 6, 2024

LGTM
@hiifong Does it work now?

The layout is still broken, This time I am using a Mac system. image

@wxiaoguang Can you fix this?

And the spacing between the items is too tight

@yp05327
Copy link
Member Author

yp05327 commented Dec 6, 2024

The white space LGTM, but maybe you are using high DPI display, so the result is different to us.

@wxiaoguang
Copy link
Contributor

Fixed in 6412de6

@wxiaoguang wxiaoguang enabled auto-merge (squash) December 6, 2024 14:08
@hiifong
Copy link
Member

hiifong commented Dec 6, 2024

Fixed in 6412de6

LGTM

@hiifong
Copy link
Member

hiifong commented Dec 6, 2024

One more question.

image

@hiifong
Copy link
Member

hiifong commented Dec 6, 2024

One more question.

image

Does this meet your expectations?

@yp05327
Copy link
Member Author

yp05327 commented Dec 6, 2024

This is by design. Same to GitHub.

@wxiaoguang wxiaoguang merged commit faf5705 into go-gitea:main Dec 6, 2024
26 checks passed
@wxiaoguang wxiaoguang deleted the github-like-repo-home-page branch December 6, 2024 15:04
@wxiaoguang
Copy link
Contributor

Then we could add a "sync fork" button like GitHub:

-> Support "merge upstream branch" (Sync fork) #32741

@@ -1,4 +1,4 @@
<table id="repo-files-table" class="ui single line table tw-mt-0" {{if .HasFilesWithoutLatestCommit}}hx-indicator="tr.notready td.message span" hx-trigger="load" hx-swap="morph" hx-post="{{.LastCommitLoaderURL}}"{{end}}>
<table id="repo-files-table" class="ui single line fixed table tw-mt-0" {{if .HasFilesWithoutLatestCommit}}hx-indicator="tr.notready td.message span" hx-trigger="load" hx-swap="morph" hx-post="{{.LastCommitLoaderURL}}"{{end}}>
Copy link
Member

@silverwind silverwind Dec 8, 2024

Choose a reason for hiding this comment

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

This fixed causes long commit messages to cut off too soon and the timestamp column to get too wide. I recommand against it. But without it, they table overflows on certain viewports. It needs more investigation. Ideally we should rewrite the table in flex layout.

Copy link
Member

Choose a reason for hiding this comment

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

#32759 will fix that and revert the table layout.

@@ -2172,11 +2154,7 @@ td .commit-summary {
justify-content: flex-end;
}

.repo-button-row[data-is-homepage="false"] .repo-button-row-right {
flex-grow: 0;
}
Copy link
Member

Choose a reason for hiding this comment

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

This rule removal caused regression #32753.

Copy link
Contributor

Choose a reason for hiding this comment

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

-> Fix repo home row-right grow #32763

@yp05327 yp05327 mentioned this pull request Dec 8, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 9, 2024
* giteaofficial/main:
  [skip ci] Updated licenses and gitignores
  Fix repo home row-right grow (go-gitea#32763)
  Refactor issue list (go-gitea#32755)
  Fix compare page bug view as anonymous (go-gitea#32754)
  Split issue/pull view router function as multiple smaller functions (go-gitea#32749)
  fix: render job title as commit message (go-gitea#32748)
  Fix typescript errors in Vue files, fix regression in "Recent Commits" chart (go-gitea#32649)
  Refactor LabelEdit (go-gitea#32752)
  [skip ci] Updated translations via Crowdin
  fix(project): add title to project view page (go-gitea#32747)
  [skip ci] Updated translations via Crowdin
  Fix case of .tsbuildinfo in .gitignore (go-gitea#32737)
  Support "merge upstream branch" (Sync fork) (go-gitea#32741)
  Update changelog to add missed changelog (go-gitea#32734)
  GitHub like repo home page (go-gitea#32213)
  Refactor markdown render (go-gitea#32736)
  Make wiki pages visit fast (go-gitea#32732)
  Refactor markdown render (go-gitea#32728)
  Refactor RepoActionView.vue, add `::group::` support (go-gitea#32713)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants