Skip to content

Conversation

@liuliu-dev
Copy link
Contributor

Fixes a whitespace gap that appears on narrow viewports when PageLayout has a forced height (e.g., height: 100%).

Closes https://github.com/github/primer/issues/6253

Problem

When PageLayout has a fixed/forced height and the viewport is narrow, the PageLayoutContent container becomes taller than its children need. With flex-direction: row (default) + flex-wrap: wrap, the extra vertical space causes a visible whitespace gap above the pane.

Solution

Add flex-direction: column to .PageLayoutContent on narrow viewports.

Testing

Added a regression test story FixedHeightResponsive that reproduces the issue.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

Copilot AI review requested due to automatic review settings January 9, 2026 23:04
@liuliu-dev liuliu-dev requested a review from a team as a code owner January 9, 2026 23:04
@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: 0e72d0d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the integration-tests: skipped manually label to skip these checks.

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 9, 2026
@liuliu-dev liuliu-dev requested a review from adierkens January 9, 2026 23:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a whitespace gap that appears in PageLayout on narrow viewports when the component has a forced height (e.g., height: 100%). The gap occurs because flex-direction: row with flex-wrap: wrap distributes extra vertical space as gaps between wrapped rows.

Key Changes:

  • Added flex-direction: column to .PageLayoutContent on narrow viewports to prevent unwanted wrapping behavior
  • Added comprehensive regression test story FixedHeightResponsive demonstrating the fix

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/react/src/PageLayout/PageLayout.module.css Added flex-direction: column media query for narrow viewports to fix whitespace gap
packages/react/src/PageLayout/PageLayout.responsive.stories.tsx Added FixedHeightResponsive regression test story with detailed documentation
.changeset/cyan-tigers-reply.md Added changeset for patch release

@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/10330

@primer-integration
Copy link

🔬 github-ui Integration Test Results

Check Status Details
CI ✅ Passed View run
Projects (Memex) ✅ Passed View run
VRT ✅ Passed View run

All checks passed! Your integration PR is ready for review.

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

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants