Skip to content

Planet: Keep syndicated entry content inside the column - #850

Open
softglazee wants to merge 1 commit into
WordPress:trunkfrom
softglazee:fix/8419-planet-feed-overflow
Open

Planet: Keep syndicated entry content inside the column#850
softglazee wants to merge 1 commit into
WordPress:trunkfrom
softglazee:fix/8419-planet-feed-overflow

Conversation

@softglazee

@softglazee softglazee commented Sep 1, 2026

Copy link
Copy Markdown

Trac ticket: https://meta.trac.wordpress.org/ticket/8419

The problem

At a 375px viewport, https://planet.wordpress.org/ scrolls 234px sideways.

The cause is content Planet republished from another site. A post currently in the feed was written with newsletter blocks, and those emit separators with the email column width baked into the markup:

<hr style="background-color: transparent; color: transparent; margin: 0; border: 0; border-top: 1px solid #666666; width: 560px; height: 0;">

560px is the width the newsletter plugin renders for. Planet puts that inside a column that is 342px wide at a 360px viewport.

Measured on the live page at 375px: three of these separators, each overhanging by 234px, and they are the only elements escaping the viewport. At 768px and above nothing overflows, because the column is wider than 560px.

The change

wp4.css already guards against exactly this, for one element type:

.wrapper img {
	max-width: 100%;
	height: auto;
}

This extends the same guard to the other elements that arrive from a feed with a hardcoded width, scoped to .entry so it only affects syndicated content and not wordpress.org's own layout.

Testing

Measured on https://planet.wordpress.org/ by injecting the rule and re-measuring real horizontal scrollability.

Before After
Horizontal scroll at 375px 234px 0px
Elements escaping the viewport 3 (hr) 0
The 560px separator 560px wide 302px, inside its 342px parent

No regressions at 1440px. The rule is a no-op there: 40 hr, 14 table and 90 img elements all keep their existing widths, the document height is identical at 75,139px, and horizontal scroll is 0 before and after.

Screenshots of the same viewport before and after, showing the horizontal scrollbar disappear, are attached to the Trac ticket.

On the second half of the ticket

The ticket also reports missing article images. I could not reproduce that. On the current page all 91 images load, from i0.wp.com and s.w.org, with zero broken images and zero failed network requests.

The post in the reporter's screenshot is still in the feed, and both of the images that appear broken there load correctly now, so that looks like a transient CDN failure rather than a defect in Planet.

Worth recording why it looked so severe: those images sit in a gallery block whose own background is rgb(0, 0, 0), set by the source post. When an image fails, the fallback is alt text on black, which is why the screenshot shows black rectangles. That styling comes from the syndicated content, so it is not something Planet sets.

This PR therefore only addresses the overflow, which is reproducible and measurable.

Summary by CodeRabbit

  • Bug Fixes
    • Improved responsive display of embedded content, tables, videos, iframes, and other entry elements.
    • Prevented fixed-width content from overflowing its container on different screen sizes.

Planet republishes post content from other sites, and that content can carry
pixel widths baked into the markup. A post currently in the feed uses newsletter
blocks whose separators are emitted as

    <hr style="... width: 560px; height: 0;">

560px is the email column width the plugin renders for. Planet puts that inside
a column that is 342px wide at a 360px viewport, so the page gains 234px of
horizontal scroll on phones. Measured on planet.wordpress.org at 375px: three
such separators, each overhanging by 234px, and they are the only elements
escaping the viewport.

wp4.css already guards against this for one element type:

    .wrapper img { max-width: 100%; height: auto; }

Extend the same guard to the other elements that arrive from a feed with a
hardcoded width. Scoped to `.entry` so it only applies to syndicated content.

Measured before and after on planet.wordpress.org:

    375px viewport   234px of horizontal scroll  ->  0px
    the 560px hr     560px wide                  ->  302px, inside its 342px parent

At 1440px the change is a no-op: 40 hr, 14 table and 90 img elements all keep
their existing widths and the document height is unchanged.

See https://meta.trac.wordpress.org/ticket/8419
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props softglaze, valani9099.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: c975b3f4-dca4-44d9-9ba8-6c4790fae33b

📥 Commits

Reviewing files that changed from the base of the PR and between ff6ffab and 47bf235.

📒 Files selected for processing (2)
  • wordpress.org/public_html/style/wp4-rtl.css
  • wordpress.org/public_html/style/wp4.css

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The standard and RTL WordPress.org styles now limit hardcoded-width syndicated entry elements to the width of their .wrapper .entry container.

Changes

Responsive syndicated entry content

Layer / File(s) Summary
Entry width constraints
wordpress.org/public_html/style/wp4.css, wordpress.org/public_html/style/wp4-rtl.css
Added max-width: 100% rules for horizontal rules, tables, iframes, videos, embeds, and objects within .wrapper .entry.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 47bf2

This localized stylesheet change constrains oversized syndicated content within the Planet column and removes the reported mobile horizontal overflow without changing wider layouts. No actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: preventing syndicated entry content from overflowing the Planet column.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

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

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

@nikvalani96

Copy link
Copy Markdown

@softglazee Thanks for looking into this and creating the PR! The changes look good.

@nikvalani96

nikvalani96 commented Sep 3, 2026

Copy link
Copy Markdown

Thanks again for preparing the fix. Since this PR addresses the issue I identified in Meta Trac #8419, could I please be included in the props when it is merged, if applicable?

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