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

Repo homepage tweaks #32759

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Repo homepage tweaks #32759

wants to merge 1 commit into from

Conversation

silverwind
Copy link
Member

  1. Fix commit message limited too small by fixed table layout. The non-fixed layout causes overflow issue between 872px and 768px width, fix that by switching to the mobile layout at 872px.
image
  1. Match .repository-summary to search bar in height:
image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 8, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 8, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Dec 8, 2024
@yp05327 yp05327 added this to the 1.23.0 milestone Dec 8, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 8, 2024
@yp05327
Copy link
Member

yp05327 commented Dec 8, 2024

Why I added fixed is because of this: (width is around 880px)
image

See:
#32213 (comment)

@silverwind
Copy link
Member Author

Yes, that's why I increased the media query so it no longer shows like that. Long-term we should refactor from table to flexbox/grid because tables just suck for layouting.

@yp05327
Copy link
Member

yp05327 commented Dec 9, 2024

Yes, that's why I increased the media query so it no longer shows like that.

No, I got this screen shot from this PR.

image

@silverwind
Copy link
Member Author

Hmm maybe this is dependant on font size or something. For me, the table limit was at 872px.

@@ -24,7 +24,7 @@
border-top: 1px solid var(--color-secondary); /* same to .flex-list > .flex-item + .flex-item */
}

@media (max-width: 767.98px) {
@media (max-width: 872px) { /* value is exactly where the file table starts to overflow */
Copy link
Member

Choose a reason for hiding this comment

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

In my case, at least around 911px is necessary.
monitor is 1080p, OS is windows, browser is Chrome latest version

image
image

Copy link
Contributor

Choose a reason for hiding this comment

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

I would never believe such pixel-level fine-tuning could be right ......

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not, but this table is a huge pixel hack to begin with, and tables are very hard to get responsive.

Copy link
Member

@yp05327 yp05327 Dec 9, 2024

Choose a reason for hiding this comment

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

Actually this fix is a pixel-level fine-tuning.
And I think the root reason it table's width is not correctly calculated, so simply adjust max-width is not right.

If you think this is a pixel-level fine-tuning, then I will give you a more simplify example:
If there's only Description, you will see:
image

@silverwind silverwind marked this pull request as draft December 9, 2024 17:09
@wxiaoguang
Copy link
Contributor

The root problem is that there were so many hacky patches. A clear solution should be completely rewriting these styles.

image

@silverwind
Copy link
Member Author

silverwind commented Dec 10, 2024

Yes, but I'm not sure <table> can do all we want. Flexbox or Grid surely would.

I played around with these styles earlier and some of them didn't do anything.

@wxiaoguang
Copy link
Contributor

It should be like this: Fix repo home file list #32788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/templates This PR modifies the template files size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants