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 Run ID: 📒 Files selected for processing (5)
📝 WalkthroughSummary by CodeRabbit
WalkthroughTerminal Execute and Install components now render only the currently selected package manager's command instead of all variants toggled via CSS. A new ChangesSelected package manager rendering
Possibly related PRs
Suggested reviewers: 🚥 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! |
Linked issue
Fixes #3016
Context
The terminal command boxes rendered every package manager variant and hid the inactive ones with CSS. Because the hidden variants still affected
space-y-1sibling spacing, the last package manager in the list rendered a shorter box when selected.Description
This change renders only the selected package manager command in
Terminal/Install.vueandTerminal/Execute.vueinstead of keeping every variant in the DOM. A small shared helper now resolves the selected package manager config for the UI paths that need a safe fallback.A focused Nuxt regression test covers the terminal rendering so the selected package manager is the only command variant rendered.
Verification
npm exec pnpm@11.10.0 -- exec vitest --project nuxt test/nuxt/components/Terminal.spec.tsnpm exec pnpm@11.10.0 -- lint:fixnpm exec pnpm@11.10.0 -- exec vitest --project nuxt test/nuxt/pages/ComparePage.spec.ts test/nuxt/pages/PackageVersionsPage.spec.ts test/nuxt/composables/use-command-palette-commands.spec.tsnpm exec pnpm@11.10.0 -- exec nuxt preparenpm exec pnpm@11.10.0 -- exec vue-tsc -b --noEmitNotes
pnpm test:typescould not complete in this Windows environment because thelex buildstep failed while creating its shared-memory IPC channel.test/nuxt/composables/use-command-palette-commands.spec.tsreproduces on cleanorigin/main, so it is pre-existing and unrelated to this change.