fix(ui): render only the selected terminal command#3023
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughTerminal Execute and Install now render only the currently selected package manager’s command. Shared configuration lookup is used by terminal components and install-command construction, replacing CSS-based variant visibility. Tests verify selected-manager output. ChangesSelected package manager rendering
Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Hello! Thank you for opening your first PR to npmx, @juninhokaponne! 🚀 Here’s what will happen next:
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@graphieros could you review my changes? |
|
The fix seems to work. |
|
@graphieros Yes, I used AI assistance to help organize and improve the PR description. The entire implementation were done by me. and I made sure the description reflects right the changes before submitting it. |
@juninhokaponne Ok, thank you for honest answer. As you may know, if you read the contribution guide, we do not mind if contributors use AI to assist with coding, as long as the result is thoroughly reviewed by the author before submitting the PR. However, we insist that PR descriptions be in your own words. Our vision of open-source is also about human connection. |
|
Oh, I got it, and I completely agree with that. I'll update the PR description and rewrite it in my own words. Thanks for taking the time to explain it. I'm really enjoying contributing to the npmx project, and I'd love to become a more active contributor over time. I really appreciate the guidance!
|
|
@graphieros I've updated the PR description. |
🔗 Linked issue
Fixes #3016
🧭 Context
The terminal rendered all package manager commands and hid the inactive ones with CSS. Since they were still in the DOM, the layout wasn't consistent when the last package manager was selected.
📚 Description
This PR changes the terminal to render only the selected package manager command.
I also moved the package manager selection logic into a shared helper to avoid repeating the same code.
A regression test was added to make sure only the selected command is rendered.