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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/repo/view_list.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<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}}>
<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}}>
<thead>
<tr class="commit-list">
<th class="tw-overflow-hidden" colspan="2">
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,7 @@ td .commit-summary {

.repository .repository-summary .sub-menu .item {
flex: 1;
height: 30px;
height: 33.6px; /* match search bar height */
line-height: var(--line-height-default);
display: flex;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/repo/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -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

.repo-grid-filelist-sidebar {
grid-template-columns: 100%;
grid-template-rows: auto auto auto;
Expand Down
Loading