fix: clickable rows & mobile scrollbar overflow & dynamic line width#1080
fix: clickable rows & mobile scrollbar overflow & dynamic line width#1080danielroe merged 7 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThree 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 Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
I found a minor issue; I'll fix it later. |
app/components/Code/Viewer.vue
Outdated
| }) | ||
|
|
||
| // Dynamically compute line number column width based on digit count | ||
| const lineNumberWidth = computed(() => { |
There was a problem hiding this comment.
I think this could be more performant if we set a css variable on the entire column, and reference it in each line....
There was a problem hiding this comment.
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!
…1080) Co-authored-by: Daniel Roe <daniel@roe.dev>
this pr: