Skip to content

fix(ui): reduce spacing between checkbox and first column when few columns shown#14776

Merged
PatrikKozak merged 2 commits into
mainfrom
fix/table-column-alignment-few-columns
Dec 1, 2025
Merged

fix(ui): reduce spacing between checkbox and first column when few columns shown#14776
PatrikKozak merged 2 commits into
mainfrom
fix/table-column-alignment-few-columns

Conversation

@PatrikKozak
Copy link
Copy Markdown
Contributor

@PatrikKozak PatrikKozak commented Dec 1, 2025

What?

Fixes checkbox column alignment in list views when only a few columns are selected.

Why?

When a collection has only a few columns visible in the list view, the checkbox column was expanding to fill excessive space. The table has min-width: 100% which forces it to fill the container width, and all columns have the same min-width: 150px, causing them to distribute the available space evenly. This created an awkward gap between the checkbox and the first data column.

How?

Sets the checkbox and drag handle column widths to var(--base) (20px) to match their actual content size. This is a CSS-only solution that keeps these columns compact regardless of how many columns are displayed, reducing the spacing to the first data column.

Before

Screenshot 2025-12-01 at 1 41 59 PM Screenshot 2025-12-01 at 1 42 08 PM

After

Screenshot 2025-12-01 at 4 58 04 PM Screenshot 2025-12-01 at 4 57 57 PM

Fixes #14741

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 1, 2025

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@PatrikKozak PatrikKozak merged commit 6ae1bc8 into main Dec 1, 2025
98 checks passed
@PatrikKozak PatrikKozak deleted the fix/table-column-alignment-few-columns branch December 1, 2025 22:25
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 3, 2025

🚀 This is included in version v3.66.0

zubricks pushed a commit that referenced this pull request Jan 6, 2026
…lumns shown (#14776)

### What?

Fixes checkbox column alignment in list views when only a few columns
are selected.

### Why?

When a collection has only a few columns visible in the list view, the
checkbox column was expanding to fill excessive space. The table has
`min-width: 100%` which forces it to fill the container width, and all
columns have the same `min-width: 150px`, causing them to distribute the
available space evenly. This created an awkward gap between the checkbox
and the first data column.

### How?

Sets the checkbox and drag handle column widths to `var(--base)` (20px)
to match their actual content size. This is a CSS-only solution that
keeps these columns compact regardless of how many columns are
displayed, reducing the spacing to the first data column.

#### Before
<img width="1410" height="556" alt="Screenshot 2025-12-01 at 1 41 59 PM"
src="https://github.com/user-attachments/assets/4a756bdb-8af3-44ed-9bad-1240e8f4fda5"
/>

<img width="1410" height="495" alt="Screenshot 2025-12-01 at 1 42 08 PM"
src="https://github.com/user-attachments/assets/2560cd35-bc9a-4f82-a9ca-d353d0cd00b3"
/>

#### After
<img width="1360" height="529" alt="Screenshot 2025-12-01 at 4 58 04 PM"
src="https://github.com/user-attachments/assets/c17fbb8b-7d16-469e-ac3d-9cb7f27d82f4"
/>

<img width="1363" height="516" alt="Screenshot 2025-12-01 at 4 57 57 PM"
src="https://github.com/user-attachments/assets/d3aa06dd-83b1-4f45-a64e-4eb288659809"
/>

Fixes #14741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Title column misaligned when it's the only column selected in admin list view

2 participants