Skip to content

Fix post list title column being squeezed by Stats column width#4105

Closed
m wants to merge 2 commits intoParsely:developfrom
m:fix/post-list-column-width
Closed

Fix post list title column being squeezed by Stats column width#4105
m wants to merge 2 commits intoParsely:developfrom
m:fix/post-list-column-width

Conversation

@m
Copy link
Copy Markdown

@m m commented Mar 31, 2026

Problem

The Parse.ly Stats (7d) column sets width: 200px, which is far too wide for the short numeric content it displays (a view count or "—"). On sites with additional plugin columns (e.g. Jetpack Stats), WordPress core's table-layout: fixed squeezes the Title column — the only column without an explicit width — to as little as ~50px, making post titles unreadable.

Fix

  • Change the Parse.ly column width from 200px to 6% (~69px at typical viewport), which is more than enough for its short content and scales naturally (removing the need for the 991px media query override).
  • Reduce core's 15% for Categories and Tags to 10% — these columns typically show short content and 15% is disproportionate when plugin columns are present.

Results

Column Before After
Title ~50px ~292px
Categories 172px (15%) 115px (10%)
Tags 172px (15%) 115px (10%)
Parse.ly Stats 200px 69px (6%)

No horizontal scrollbar. Tested on WordPress 7.1-alpha (trunk) with Jetpack Stats column active, verified at multiple viewport widths.

Summary by CodeRabbit

  • Style
    • Updated column width styling for post list statistics display, improving responsive layout behavior for category and tag columns.

The Parse.ly Stats column sets width: 200px, which is far too wide
for its short numeric content. On sites with additional plugin columns
(e.g. Jetpack Stats), this squeezes the Title column to ~50px, making
post titles unreadable.

- Change Parse.ly column from 200px to 6% (~69px), removing the 991px
  media query since 6% scales naturally
- Reduce Categories and Tags from core's 15% to 10%, as these columns
  typically show short content and 15% is disproportionate when plugin
  columns are present

Tested on WordPress 7.1-alpha trunk with Jetpack Stats active.
Title column recovers from ~50px to ~292px. No horizontal scrollbar.
@m m requested a review from a team as a code owner March 31, 2026 09:27
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 31, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (3)
  • build/content-helper/post-list-stats-rtl.css is excluded by !build/**
  • build/content-helper/post-list-stats.asset.php is excluded by !build/**
  • build/content-helper/post-list-stats.css is excluded by !build/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87209e14-581d-4f92-acb7-ceddea4f5188

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Modified styling in the post-list-stats component by replacing fixed pixel widths with percentage-based widths for column elements. Converted .column-parsely-stats to use 6% width, and added conditional 10% width for .column-categories and .column-tags when within a .fixed container.

Changes

Cohort / File(s) Summary
Post List Stats Styling
src/content-helper/post-list-stats/post-list-stats.scss
Replaced fixed pixel width with percentage-based width (6%) for .column-parsely-stats and added responsive width rule (10%) for .column-categories and .column-tags within .fixed containers, removing previous media-query adjustments.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing the issue where the Stats column width causes the Title column to be squeezed, which is the primary objective of the PR.
Description check ✅ Passed The PR description includes all required sections: a clear Problem statement, the Fix applied, Results with a comparison table, and testing details. It is comprehensive and well-structured.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@m
Copy link
Copy Markdown
Author

m commented Mar 31, 2026

17095

@acicovic
Copy link
Copy Markdown
Collaborator

Hi @m, thank you for your contribution.

As a first step, I've rebuilt the project's assets (this is pushed to your branch). I will be testing this momentarily and let you know of any feedback.

Thanks!

@acicovic
Copy link
Copy Markdown
Collaborator

The changes cause text wrapping inside the cell. Screenshots for demonstration:

1900px Viewport (no issue)
image

1500px Viewport (issue visible)
image

800px Viewport (issue pronounced)
image

Things we can do:

  1. There's some room to make the column width a bit smaller, but not by a lot. The size could be around 140px or so, but we'd need to test what happens with big numbers.
  2. If Instead of displaying text, we could resort to displaying icons if we want to limit the column width to the max possible.

Let me know of your feedback. I'm happy to take this to the finish line, or review any new code.

Thank you.

@acicovic
Copy link
Copy Markdown
Collaborator

acicovic commented Apr 3, 2026

Closing this in favor of #4136, which replaces the metric strings with icons, and brings some additional improvements.

Any feedback welcome, and the plan is to release this on Monday.

@acicovic acicovic closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants