Skip to content

refactor(ui): distributions of elements in package header#855

Open
MatteoGabriele wants to merge 7 commits intonpmx-dev:mainfrom
MatteoGabriele:refactor/package-header-ui-distribution
Open

refactor(ui): distributions of elements in package header#855
MatteoGabriele wants to merge 7 commits intonpmx-dev:mainfrom
MatteoGabriele:refactor/package-header-ui-distribution

Conversation

@MatteoGabriele
Copy link
Contributor

@MatteoGabriele MatteoGabriele commented Feb 3, 2026

These changes resolve several issues related to the current layout and element placement. They guarantee that the entire header experiences minimal element movement and overlaps.

The header, with its variable package name and numerous elements (version, provenance, badges, code, docs, etc.), can be very hard to maintain.
This becomes especially tricky as the screen size shrinks, causing misaligned elements.

The idea is to limit the number of variables at play:

  • the package name sits alone, with only the repository star count, which is a very important metric for how users judge whether to use a library or another
  • versions and badges sit right under the package name
  • the description stays the same
  • Various links and tabs are next to each other, which also makes more sense since the mobile view has them all together.

Notes

  • The org/name has been renamed simply using the provider name to avoid long names that eat space and repetition with the header title
  • The forks link has been removed. I can put it back, if everyone thinks it's very useful, but tbh, I feel it's the least important info I can get from the view, and it just takes space and visual attention.

Let me know what you think and if it needs adjustments

I've attached two videos: one with a small name and one with a longer name, to demonstrate that it works well in both cases.

Screen.Recording.2026-02-03.at.16.26.45.mov
Screen.Recording.2026-02-03.at.16.26.02.mov

@MatteoGabriele MatteoGabriele changed the title refactor(ui): better distributions of elements in package header refactor(ui): distributions of elements in package header Feb 3, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

The PR restructures the package page header into a flex-based layout with a persistent left column. Organisation link rendering is moved inside the header and made conditional; the copy button is repositioned. Version rendering now shows requested vs resolved versions with provenance/not-latest indicators. External links are grouped; mobile nav items moved to a compact list; internal navigation retained for larger screens. Public API: useRepoMeta(repositoryUrl) now destructures { repoRef, stars, starsLink } (forks and forksLink removed). Changes: +267 / -270.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, detailing layout reorganisation of the package header with specific changes to element placement and removal of forks link.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 14.49275% with 59 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[...package].vue 14.49% 52 Missing and 7 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Error Error Feb 4, 2026 8:26pm
npmx.dev Ready Ready Preview, Comment Feb 4, 2026 8:26pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 4, 2026 8:26pm

Request Review

@graphieros
Copy link
Contributor

Looks great !
We discussed in chat about the removal of the fork-count, which does not reach consensus.
I personally think this metric has some merit, but would not mind not having if it improves the layout.

Copy link
Contributor

@wojtekmaj wojtekmaj left a comment

Choose a reason for hiding this comment

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

Works nicely for me

@jhroemer
Copy link
Contributor

jhroemer commented Feb 4, 2026

Awesome stuff, thanks for this @MatteoGabriele

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.

4 participants