[fix/feat:ui] Use Kbd for menu shortcuts#3226
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
ApprovabilityVerdict: Approved Minor UI refactor replacing an inline-styled You can customize Macroscope's approvability policy. Learn more. |
What changed
Menu shortcuts now render through the shared Kbd component with the same compact sizing used by the search shortcut.
Why
The dropdown shortcut pill looked different from
Ctrl+Kbecause it used separate text styling instead of the shared keyboard hint component.UI changes
Before:
After:
Checklist
Testing
vp check;vp run typecheckpassed locally before splitting these PRs.Note
Replace native
kbdwithKbdcomponent inMenuShortcutUpdates menu.tsx to render the shared
Kbdcomponent instead of a raw<kbd>element, and swaps font-related classes for sizing/spacing classes (ms-auto h-4 min-w-0 rounded-sm px-1.5 text-[10px]). This changes the DOM output and visual appearance of keyboard shortcuts in menus.Macroscope summarized 7fa11de.
Note
Low Risk
Presentation-only change in menu.tsx; no logic, API, or data handling impact.
Overview
Menu shortcut pills now go through the shared
Kbdcomponent instead of a plain<kbd>with one-off typography, so dropdown hints match keyboard hints like Ctrl+K.MenuShortcutkeepsms-autoand adds compact overrides (h-4,min-w-0,rounded-sm,px-1.5,text-[10px]) on top ofKbd’s muted pill styling. Call sites (MenuShortcut/DropdownMenuShortcut) are unchanged.Reviewed by Cursor Bugbot for commit 7fa11de. Bugbot is set up for automated code reviews on this repo. Configure here.