Skip to content

fix(ui): remove empty space on the package page when the readme is short#2194

Merged
ghostdevv merged 3 commits intonpmx-dev:mainfrom
howwohmm:fix/package-grid-align
Mar 23, 2026
Merged

fix(ui): remove empty space on the package page when the readme is short#2194
ghostdevv merged 3 commits intonpmx-dev:mainfrom
howwohmm:fix/package-grid-align

Conversation

@howwohmm
Copy link
Contributor

🔗 Linked issue

Fixes #2190

🧭 Context

On packages with short README sections (e.g. /package/next, /package/@angular/core), the left-column blocks (Get started, vulns) had large empty gaps because the grid rows stretched to match the taller sidebar.

📚 Description

The 1280px+ desktop breakpoint was missing grid-template-rows. Without it, extra height from the sidebar spanning all rows gets distributed evenly across every row — inflating install/vulns cells.

Adding grid-template-rows: auto auto auto 1fr pushes all extra space into the readme row (the last one), keeping details/install/vulns compact at the top.

The 1024px breakpoint already had this pattern (auto auto auto auto 1fr).

What it doesn't change

  • Sidebar sticky behavior is unaffected (it still spans all rows)
  • Mobile layout is unaffected (single column, no spanning)
  • No changes to component logic or template

The 1280px+ breakpoint had no explicit grid-template-rows, so extra
sidebar height was distributed across all rows. Adding auto auto auto 1fr
pushes extra space into the readme row instead of the install/vulns area.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Mar 23, 2026 5:14am
npmx.dev Ready Ready Preview, Comment Mar 23, 2026 5:14am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Mar 23, 2026 5:14am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7bbfff8b-fce3-4bbb-aeda-3c7922308599

📥 Commits

Reviewing files that changed from the base of the PR and between 86bb869 and 9c63623.

📒 Files selected for processing (1)
  • app/pages/package/[[org]]/[name].vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/pages/package/[[org]]/[name].vue

📝 Walkthrough

Walkthrough

The PR updates the .packagePage CSS grid for desktop (min-width: 1280px) to explicitly set grid-template-rows: auto auto auto 1fr. The change adds that row definition on the desktop breakpoint and removes a grid-template-rows declaration from the tablet block; other breakpoints remain unchanged.

Suggested reviewers

  • danielroe
  • graphieros
  • serhalp
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is directly related to the changeset, clearly explaining the grid layout fix and its rationale.
Linked Issues check ✅ Passed The PR successfully implements the proposed fix from issue #2190 by adding grid-template-rows at the desktop breakpoint to prevent unwanted empty space.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the grid layout issue in issue #2190; no unrelated modifications are present.

✏️ 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.

@codecov
Copy link

codecov bot commented Mar 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

It seems to have been added in 2ad8034
when there were five rows, but then the header row was removed and so
this one is no longer needed
@ghostdevv ghostdevv changed the title fix(ui): prevent empty space in package grid when readme is short fix(ui): remove empty space on the package page when the readme is short Mar 23, 2026
@ghostdevv ghostdevv enabled auto-merge March 23, 2026 05:14
@ghostdevv ghostdevv added this pull request to the merge queue Mar 23, 2026
Merged via the queue into npmx-dev:main with commit 39c2a3b Mar 23, 2026
20 of 21 checks passed
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.

Huge empty space around "Get started" block on some packages

2 participants