Skip to content

Comments

fix: clickable rows & mobile scrollbar overflow & dynamic line width#1080

Merged
danielroe merged 7 commits intonpmx-dev:mainfrom
RYGRIT:fix/issue-1073-viewer-layout
Feb 7, 2026
Merged

fix: clickable rows & mobile scrollbar overflow & dynamic line width#1080
danielroe merged 7 commits intonpmx-dev:mainfrom
RYGRIT:fix/issue-1073-viewer-layout

Conversation

@RYGRIT
Copy link
Contributor

@RYGRIT RYGRIT commented Feb 6, 2026

this pr:

before after
image image

@vercel
Copy link

vercel bot commented Feb 6, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 7, 2026 0:36am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 7, 2026 0:36am
npmx-lunaria Ignored Ignored Feb 7, 2026 0:36am

Request Review

@codecov
Copy link

codecov bot commented Feb 6, 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!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Three Vue components were changed. DirectoryListing.vue altered table structure: the name cell now spans two columns, file sizes are shown inline beside filenames, and link elements receive vertical padding. Viewer.vue adds a computed lineDigits and binds --line-digits to compute the line-number column min-width; it also adds max-w-full and minor border/layout class adjustments. app/pages/package-code/[...path].vue removes md-specific positioning classes so sticky positioning and height apply unconditionally and adds overflow-x-hidden while keeping vertical scrolling.

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed PR description is related to the changeset, addressing scrollbar overflow and line number width issues.
Linked Issues check ✅ Passed Changes address all objectives from issue #1073: clickable rows expanded, mobile scrollbar overflow fixed, and line width dynamically calculated.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #1073 objectives: DirectoryListing clickable area, Viewer line width, and package-code overflow handling.

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

@RYGRIT RYGRIT marked this pull request as draft February 6, 2026 09:44
@RYGRIT
Copy link
Contributor Author

RYGRIT commented Feb 6, 2026

I found a minor issue; I'll fix it later.

})

// Dynamically compute line number column width based on digit count
const lineNumberWidth = computed(() => {
Copy link
Member

Choose a reason for hiding this comment

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

I think this could be more performant if we set a css variable on the entire column, and reference it in each line....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see your point. Moving the calc() logic to CSS keeps the styling concerns (like the 1.5rem padding offset) out of the JavaScript, which improves maintainability.

I'll update it to pass the digit count as a CSS variable (e.g. --line-digits) to the container, and let CSS handle the width calculation. Thanks!

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

👌

@danielroe danielroe added this pull request to the merge queue Feb 7, 2026
Merged via the queue into npmx-dev:main with commit 4640f27 Feb 7, 2026
17 checks passed
whitep4nth3r pushed a commit that referenced this pull request Feb 7, 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.

Expand clickable area of file list in code viewer

2 participants